/[Frey]/trunk/lib/Frey/Pipe.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/Pipe.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 861 by dpavlin, Tue Dec 16 20:59:48 2008 UTC
# Line 1  Line 1 
1  package Frey::Pipe;  package Frey::Pipe;
2  use Moose;  use Moose;
3  extends 'Frey::ClassLoader';  extends 'Frey::Class::Loader';
4  with 'Frey::Web';  with 'Frey::Web';
5    
6    use lib 'lib';
7  use Frey::Action;  use Frey::Action;
8    
9  =head1 DESCRIPTION  =head1 DESCRIPTION
# Line 43  sub as_markup { Line 44  sub as_markup {
44                  warn "# part: '$part'";                  warn "# part: '$part'";
45                  if ( $part =~ m{^([^/]+)/([^\+\?]+)(.*)?$} ) {                  if ( $part =~ m{^([^/]+)/([^\+\?]+)(.*)?$} ) {
46                          my ( $class, $method, $args ) = ( $1, $2, $3 );                          my ( $class, $method, $args ) = ( $1, $2, $3 );
                         push @parts, { $class => { method => $method, args => $args } };  
47                          my $params = $pipe;                          my $params = $pipe;
48                          $params = {} unless defined $params;                          $params = {} unless defined $params;
49                          if ( defined $args ) {                          if ( defined $args ) {
# Line 63  sub as_markup { Line 63  sub as_markup {
63                          my $result = $o->$method;                          my $result = $o->$method;
64                          warn "# result ",length( $result ), " bytes ", ref($result);                          warn "# result ",length( $result ), " bytes ", ref($result);
65    
66                            $self->add_status({ $part => { $class => { method => $method, args => $args } } });
67    
68                          $self->content_type( $o->content_type ) if $o->can('content_type');                          $self->content_type( $o->content_type ) if $o->can('content_type');
69    
70                          $out = $result;                          $out = $result;
# Line 73  sub as_markup { Line 75  sub as_markup {
75                  }                  }
76          }          }
77    
78          warn "# pipe ", $self->title, " parts ",dump( @parts );          $out = $self->error("$out not scalar" . $self->html_dump($out) ) if ref $out;
79          $self->add_status( $_ ) foreach @parts;  
80          return $out;          return $out;
81  }  }
82    

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

  ViewVC Help
Powered by ViewVC 1.1.26