/[Frey]/trunk/lib/Frey/Run.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/lib/Frey/Run.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 653 by dpavlin, Sun Nov 30 23:49:32 2008 UTC revision 862 by dpavlin, Tue Dec 16 21:00:27 2008 UTC
# Line 1  Line 1 
1  package Frey::Run;  package Frey::Run;
2  use Moose;  use Moose;
3  #extends 'Frey::ClassLoader';  #extends 'Frey::Class::Loader';
4  extends 'Frey::Action';  extends 'Frey::Action';
5  with 'Frey::Session';  with 'Frey::Session';
6    
# Line 104  sub html { Line 104  sub html {
104    
105                          if ( $self->run =~ m{as_markup} ) {                          if ( $self->run =~ m{as_markup} ) {
106                                  $html = $o->page( run => $self->run );                                  $html = $o->page( run => $self->run );
107                          } elsif ( $self->run =~ m{as_sponge} ) {                          } elsif ( $self->run =~ m{(.*as_sponge)} ) {
108                                  $data = $o->as_sponge;                                  $data = $o->$1;
109                                  confess "invalid data from sponge = ", dump( $data ) unless ref($data) eq 'HASH';                                  confess "invalid data from sponge = ", dump( $data ) unless ref($data) eq 'HASH';
110                                  if ( $self->format eq 'html' ) {                                  if ( $self->format eq 'html' ) {
111                                          my $rows = $#{ $data->{rows} } + 1;                                          my $rows = $#{ $data->{rows} } + 1;
# Line 137  sub html { Line 137  sub html {
137                          $o->title( $class );                          $o->title( $class );
138    
139                          $html = $o->page( body => $body ) if $body && !$html;                          $html = $o->page( body => $body ) if $body && !$html;
140                                    $self->content_type( $o->content_type );
141    
142                          confess "no html output for $class ", $o->dump unless defined $html;                          confess "no html output for $class ", $o->dump unless defined $html;
143                  };                  };
144    
# Line 150  sub html { Line 151  sub html {
151                  my $o = Frey->new;                  my $o = Frey->new;
152                  $o->{request_url} = $self->request_url; # sigh, this is dynamic languge, right?                  $o->{request_url} = $self->request_url; # sigh, this is dynamic languge, right?
153                  Frey::Web->meta->apply( $o );                  Frey::Web->meta->apply( $o );
154                  $html = $o->page( body => $self->error( $error ) );                  $html = $o->page( body => $self->error( $error, undef ) );
155          }          }
156    
157          warn $self->class, " produced ", length($html), " bytes";          warn $self->class, " produced ", length($html), " bytes of ", $self->content_type;
158    
159          return $html;          return $html;
160  }  }

Legend:
Removed from v.653  
changed lines
  Added in v.862

  ViewVC Help
Powered by ViewVC 1.1.26