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 |
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 ) { |
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; |
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 |
|
|