/[Frey]/branches/zimbardo/lib/Frey/Web.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 /branches/zimbardo/lib/Frey/Web.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 949 by dpavlin, Tue Jan 6 16:05:05 2009 UTC revision 957 by dpavlin, Wed Jan 7 17:50:03 2009 UTC
# Line 71  has 'html_dump_width' => ( Line 71  has 'html_dump_width' => (
71          default => 250,          default => 250,
72  );  );
73    
74    has 'wrap_in_page' => (
75            documentation => 'wrap full html page with status bar around content',
76            is => 'rw',
77            isa => 'Bool',
78            default => 1,
79    );
80    
81  my %escape = ('<'=>'&lt;', '>'=>'&gt;', '&'=>'&amp;', '"'=>'&quot;');  my %escape = ('<'=>'&lt;', '>'=>'&gt;', '&'=>'&amp;', '"'=>'&quot;');
82  my $escape_re  = join '|' => keys %escape;  my $escape_re  = join '|' => keys %escape;
83    
# Line 276  sub page { Line 283  sub page {
283                  warn "# no body, invoke $self->$run on ", ref($self);                  warn "# no body, invoke $self->$run on ", ref($self);
284                  $body = $self->$run;                  $body = $self->$run;
285          }          }
286          if ( $self->content_type !~ m{html} ) {          if ( $self->content_type !~ m{html} || ! $self->wrap_in_page ) {
287                  warn "# return only $self body ", $self->content_type;                  warn "# return only $self body ", $self->content_type;
288                  return $body                  return $body
289          } elsif ( ! defined $body ) {          } elsif ( ! defined $body ) {

Legend:
Removed from v.949  
changed lines
  Added in v.957

  ViewVC Help
Powered by ViewVC 1.1.26