84 |
$self->load_class( $class ); |
$self->load_class( $class ); |
85 |
|
|
86 |
if ( my $form = $self->params_form ) { |
if ( my $form = $self->params_form ) { |
87 |
$html = $self->page( body => $form ); |
$html = $self->html_page( body => $form ); |
88 |
warn "got required params form for $class ", $self->run, " format: ", $self->format; |
warn "got required params form for $class ", $self->run, " format: ", $self->format; |
89 |
} else { |
} else { |
90 |
|
|
110 |
$o->depends if $o->can('depends'); |
$o->depends if $o->can('depends'); |
111 |
|
|
112 |
if ( $self->run =~ m{as_markup} ) { |
if ( $self->run =~ m{as_markup} ) { |
113 |
$html = $o->page( run => $self->run ); |
$html = $o->html_page( run => $self->run ); |
114 |
} elsif ( $self->run =~ m{(.*as_sponge)} ) { |
} elsif ( $self->run =~ m{(.*as_sponge)} ) { |
115 |
$data = $o->$1; |
$data = $o->$1; |
116 |
confess "invalid data from sponge = ", dump( $data ) unless ref($data) eq 'HASH'; |
confess "invalid data from sponge = ", dump( $data ) unless ref($data) eq 'HASH'; |
146 |
|
|
147 |
$o->title( $class ); |
$o->title( $class ); |
148 |
|
|
149 |
$html = $o->page( body => $body ) if $body && !$html; |
$html = $o->html_page( body => $body ) if $body && !$html; |
150 |
$self->content_type( $o->content_type ); |
$self->content_type( $o->content_type ); |
151 |
|
|
152 |
confess "no html output for $class ", $o->dump unless defined $html; |
confess "no html output for $class ", $o->dump unless defined $html; |
170 |
my $o = Frey->new; |
my $o = Frey->new; |
171 |
$o->{request_url} = $self->request_url; # sigh, this is dynamic languge, right? |
$o->{request_url} = $self->request_url; # sigh, this is dynamic languge, right? |
172 |
Frey::Web->meta->apply( $o ); |
Frey::Web->meta->apply( $o ); |
173 |
$html = $o->page( body => $self->error( $error, undef ) ); |
$html = $o->html_page( body => $self->error( $error, undef ) ); |
174 |
} |
} |
175 |
|
|
176 |
warn $self->class, " produced ", length($html), " bytes of ", $self->content_type; |
warn $self->class, " produced ", length($html), " bytes of ", $self->content_type; |