/[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 506 by dpavlin, Wed Nov 19 19:28:09 2008 UTC revision 507 by dpavlin, Tue Nov 25 00:26:15 2008 UTC
# Line 35  sub as_markup { Line 35  sub as_markup {
35          my $out;          my $out;
36          my $pipe;          my $pipe;
37    
38          $self->title( ref($self) . ' | ' . $self->pipe );          $self->title( $self->pipe );
39    
40            my @parts;
41    
42          foreach my $part ( split(/\|/, $self->pipe ) ) {          foreach my $part ( split(/\|/, $self->pipe ) ) {
43                  warn "# part: '$part'";                  warn "# part: '$part'";
44                  if ( $part =~ m{^([^/]+)/([^\+\?]+)(.*)?$} ) {                  if ( $part =~ m{^([^/]+)/([^\+\?]+)(.*)?$} ) {
45                          my ( $class, $method, $args ) = ( $1, $2, $3 );                          my ( $class, $method, $args ) = ( $1, $2, $3 );
46                          push @{ $self->status }, { $class => { method => $method, args => $args } };                          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 ) {
50                                  $args =~ s{^[\?\+\s]}{};                                  $args =~ s{^[\?\+\s]}{};
51                                  warn "# class $class method $method args '$args'", $pipe ? " pipe args " . join(',',keys %$pipe) : '' if $self->debug;                                  warn "# class $class method $method args '$args'", $pipe ? " pipe args " . join(',',keys %$pipe) : '' if $self->debug;
                                 push @{ $self->status }, { $class =>$args };  
52                                  map {                                  map {
53                                          my ( $name, $value ) = ( $1, $2 ) if m{^([^=]+)=(.+)$} || confess "can't parse '$_'";                                          my ( $name, $value ) = ( $1, $2 ) if m{^([^=]+)=(.+)$} || confess "can't parse '$_'";
54                                          $params->{$name} = $value;                                          $params->{$name} = $value;
# Line 72  sub as_markup { Line 73  sub as_markup {
73                  }                  }
74          }          }
75    
76          warn "# pipe ", $self->title;          warn "# pipe ", $self->title, " parts ",dump( @parts );
77            $self->add_status( $_ ) foreach @parts;
78          return $out;          return $out;
79  }  }
80    

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

  ViewVC Help
Powered by ViewVC 1.1.26