/[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 442 by dpavlin, Wed Nov 19 00:40:03 2008 UTC revision 443 by dpavlin, Wed Nov 19 02:14:48 2008 UTC
# Line 73  sub html { Line 73  sub html {
73                          $self->usage->{ $class }++;                          $self->usage->{ $class }++;
74    
75                          my $o;                          my $o;
76                          eval { $o = $class->new( %{ $self->params } ) };                          my ( $meta, $is_role, $instance ) = $self->class_meta( $class );
77                          if ( $@ ) {                          if ( $is_role ) {
78                                  warn "can't call $class->new: $@" if $@;                                  $o = $instance;
79                                  my ( $meta, $is_role, $instance ) = $self->class_meta( $class );                          } else {
80                                  $o = $instance if $is_role;                                  $o = $class->new( %{ $self->params } );
81                          }                          }
                         confess "can't create class instance for $class" unless $o;  
82    
83                          $o->depends if $o->can('depends');                          $o->depends if $o->can('depends');
84    
# Line 137  sub html { Line 136  sub html {
136                  };                  };
137          };          };
138    
139          $html = $self->page( title => $self->class, body => dump($html) . $self->error( $@ ) ) if $@;          $html = $self->page( title => $self->class, body => $self->error( $@ ) ) if $@;
140    
141          return $html;          return $html;
142  }  }

Legend:
Removed from v.442  
changed lines
  Added in v.443

  ViewVC Help
Powered by ViewVC 1.1.26