7 |
|
|
8 |
Frey::Run - display required form field for Class and run it |
Frey::Run - display required form field for Class and run it |
9 |
|
|
10 |
|
=head1 DESCRIPTION |
11 |
|
|
12 |
|
This object will try to run other Moose objects from your application. It |
13 |
|
will try to invoke C<html> or C<markup> method on the. |
14 |
|
|
15 |
=cut |
=cut |
16 |
|
|
17 |
has 'class' => ( |
has 'class' => ( |
49 |
} else { |
} else { |
50 |
my $o = $class->new( %params ); |
my $o = $class->new( %params ); |
51 |
$o->depends if $o->can('depends'); |
$o->depends if $o->can('depends'); |
52 |
$html = $o->markup; |
if ( $o->can('html') ) { |
53 |
|
warn "## turning over to $o->html"; |
54 |
|
$o->html( $req ); |
55 |
|
} elsif ( $o->can('markup') ) { |
56 |
|
warn "## using $o->markup"; |
57 |
|
$html = $o->markup; |
58 |
|
warn ">>> markup $class ",length( $html ), " bytes\n"; |
59 |
|
} else { |
60 |
|
$html = "IGNORE: $class ", $o->dump; |
61 |
|
warn $html; |
62 |
|
} |
63 |
} |
} |
64 |
|
|
|
warn ">>> markup $class ",length( $html ), " bytes\n"; |
|
65 |
$req->print( $self->page( title => $class, body => $html ) ); |
$req->print( $self->page( title => $class, body => $html ) ); |
66 |
} |
} |
67 |
|
|