/[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 421 by dpavlin, Tue Nov 18 17:12:09 2008 UTC revision 431 by dpavlin, Wed Nov 19 00:40:03 2008 UTC
# Line 4  use Moose; Line 4  use Moose;
4  extends 'Frey::Action';  extends 'Frey::Action';
5  with 'Frey::Web';  with 'Frey::Web';
6  with 'Frey::Escape';  with 'Frey::Escape';
7    with 'Frey::Session';
8    
9  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
10  use Frey::Dumper;  use Frey::Dumper;
11  use JSON;  use JSON;
12    use YAML;
13    
14  =head1 NAME  =head1 NAME
15    
# Line 68  sub html { Line 70  sub html {
70                          warn "got required params form for $class ", $self->run, " format: ", $self->format;                          warn "got required params form for $class ", $self->run, " format: ", $self->format;
71                  } else {                  } else {
72    
73                          my $o = $class->new( %{ $self->params } );                          $self->usage->{ $class }++;
74    
75                            my $o;
76                            eval { $o = $class->new( %{ $self->params } ) };
77                            if ( $@ ) {
78                                    warn "can't call $class->new: $@" if $@;
79                                    my ( $meta, $is_role, $instance ) = $self->class_meta( $class );
80                                    $o = $instance if $is_role;
81                            }
82                            confess "can't create class instance for $class" unless $o;
83    
84                          $o->depends if $o->can('depends');                          $o->depends if $o->can('depends');
85    
86                          push @{ $self->status }, { qq|<a target="editor" href="/editor+$class+1">$class</a>| => $self->params };                          push @{ $self->status }, { qq|<a target="editor" href="/editor+$class+1">$class</a>| => $self->params };
# Line 76  sub html { Line 88  sub html {
88                          if ( $self->run eq 'markup' ) {                          if ( $self->run eq 'markup' ) {
89                                  warn "## using ",ref($o), "->markup";                                  warn "## using ",ref($o), "->markup";
90                                  if ( $o->can('page') ) {                                  if ( $o->can('page') ) {
91                                          $html = $o->page;                                          #$html = $o->page;
92                                          $body = $o->markup unless $html;                                          $body = $o->markup unless $html;
93                                  } else {                                  } else {
94                                          $body = $o->markup;                                          $body = $o->markup;
# Line 111  sub html { Line 123  sub html {
123                          }                          }
124    
125                          # override our status with one from object                          # override our status with one from object
126                          $self->status( $o->status ) if $o->can('status') && $o->status;                          eval {
127                                    $self->status( $o->status );
128                            };
129                            warn "can't override status: $@" if $@;
130                  };                  };
131    
132    

Legend:
Removed from v.421  
changed lines
  Added in v.431

  ViewVC Help
Powered by ViewVC 1.1.26