119 |
$body .= Frey::View::Dumper->new( data => $data )->as_markup if defined $data; |
$body .= Frey::View::Dumper->new( data => $data )->as_markup if defined $data; |
120 |
} |
} |
121 |
|
|
122 |
warn "# status ",dump(@status); |
warn "## status from $self ",dump(@status); |
123 |
|
|
124 |
if ( $self->run eq 'as_markup' && $o->can('page') ) { |
if ( $self->run eq 'as_markup' && $o->can('page') ) { |
125 |
$o->add_status($_) foreach @status; |
$o->add_status($_) foreach @status; |
132 |
|
|
133 |
if ( ref($body) eq 'HASH' ) { |
if ( ref($body) eq 'HASH' ) { |
134 |
$html = $self->page( %$body ); |
$html = $self->page( %$body ); |
135 |
warn "WARNING: old calling method which is depriciated"; |
warn "WARNING: old calling convention with HASH which is depriciated but produced ", length($html), " bytes"; |
136 |
} elsif ( $body && ! $html ) { |
} elsif ( $body && ! $html ) { |
137 |
$html = $self->page( title => $self->class . ' run', body => $body ); |
$html = $self->page( title => $self->class . ' run', body => $body ); |
138 |
|
warn "wrap body of ",length($body), " in page with ", length($html), " bytes"; |
139 |
}; |
}; |
140 |
}; |
}; |
141 |
|
|
142 |
|
warn "## status ", dump( map { keys %$_ } @{ $self->status } ); |
143 |
|
|
144 |
$html = $self->page( title => $self->class, body => $self->error( $@ ) ) if $@; |
$html = $self->page( title => $self->class, body => $self->error( $@ ) ) if $@; |
145 |
|
|
146 |
return $html; |
return $html; |