/[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 507 by dpavlin, Tue Nov 25 00:26:15 2008 UTC revision 519 by dpavlin, Tue Nov 25 17:15:18 2008 UTC
# Line 85  sub html { Line 85  sub html {
85    
86                          my @status;                          my @status;
87    
88                          push @status, { $self->editor( $class ) => $self->params } if $o->can('status');                          push @status, { $self->editor( $class ) => $self->params };
89    
90                          if ( $self->run eq 'as_markup' && ! $o->can('page') ) {                          if ( $self->run eq 'as_markup' && ! $o->can('page') ) {
91                                  warn "## using ",ref($o), "->as_markup";                                  warn "## using ",ref($o), "->as_markup";
# Line 119  sub html { Line 119  sub html {
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                          if ( $self->run eq 'as_markup' && $o->can('page') ) {                          warn "## status from $self ",dump(@status);
123    
124                            if ( $o->can('add_status') ) {
125                                  $o->add_status($_) foreach @status;                                  $o->add_status($_) foreach @status;
                                 $html = $o->page if $o->can('page') &&  
                                 warn "got ", length($html), "for page";  
126                          }                          }
127    
128                          $self->add_status($_) foreach @status;                          if ( $self->run eq 'as_markup' && $o->can('page') ) {
129                                    $html = $o->page;
130                                    warn "got ", length($html), " for page from $o it's status is ", dump( $o->status );
131                            } else {
132                                    $self->add_status($_) foreach @status;
133                            }
134                  };                  };
135    
136                  if ( ref($body) eq 'HASH' ) {                  if ( ref($body) eq 'HASH' ) {
137                          $html = $self->page( %$body );                          $html = $self->page( %$body );
138                          warn "WARNING: old calling method which is depriciated";                          warn "WARNING: old calling convention with HASH which is depriciated but produced ", length($html), " bytes";
139                  } elsif ( $body && ! $html ) {                  } elsif ( $body && ! $html ) {
140                          $html = $self->page( title => $self->class . ' run', body => $body );                          $html = $self->page( title => $self->class . ' run', body => $body );
141                            warn "wrap body of ",length($body), " in page with ", length($html), " bytes";
142                  };                  };
143          };          };
144    
145            $self->status_parts;
146    
147          $html = $self->page( title => $self->class, body => $self->error( $@ ) ) if $@;          $html = $self->page( title => $self->class, body => $self->error( $@ ) ) if $@;
148    
149          return $html;          return $html;

Legend:
Removed from v.507  
changed lines
  Added in v.519

  ViewVC Help
Powered by ViewVC 1.1.26