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

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

revision 590 by dpavlin, Fri Nov 28 15:07:03 2008 UTC revision 591 by dpavlin, Fri Nov 28 16:39:37 2008 UTC
# Line 98  sub popup_dropdown { Line 98  sub popup_dropdown {
98    
99          $content =~ s{<span>(<code>[^<]+</code>)</span>}{$1} && $self->TODO("code wrapped in span");          $content =~ s{<span>(<code>[^<]+</code>)</span>}{$1} && $self->TODO("code wrapped in span");
100    
101          warn "## $type [$name] = ", length( $content ), " bytes" if $self->debug;          warn "## $type [$name] = ", length( $content ), " bytes"; # if $self->debug; # FIXME
102    
103          if ( $name =~ m{::} && $name !~ $re_html ) {          if ( $name =~ m{::} && $name !~ $re_html ) {
104                  return qq|<a class="frey-$type" target="$name" href="/$name">$name $content</a>\n|;                  return qq|<a class="frey-$type" target="$name" href="/$name">$name $content</a>\n|;
# Line 216  sub page { Line 216  sub page {
216          $url =~ s{\?reload=\d+}{};          $url =~ s{\?reload=\d+}{};
217    
218          my $body = $a->{body};          my $body = $a->{body};
219          $body ||= $self->as_markup if $self->can('as_markup');          if ( ! $body ) {
220                    my $run = $a->{run} || 'as_markup';
221                    warn "# no body, invoke $self->$run";
222                    $body = $self->$run;
223            }
224          if ( $self->content_type !~ m{html} ) {          if ( $self->content_type !~ m{html} ) {
225                  warn "# return only $self body ", $self->content_type;                  warn "# return only $self body ", $self->content_type;
226                  return $body                  return $body
# Line 302  Create HTML links to editor for perl err Line 306  Create HTML links to editor for perl err
306  sub editor_links {  sub editor_links {
307          my ( $self, $error ) = @_;          my ( $self, $error ) = @_;
308    
309    #       $error =~ s[(bless\({\s+.+?\s+},\s+)("[^"]+")(\) at)][<span class="frey-dropdown">$1<code>$2</code>$3</span>]gs; # FIXME insert bless hiding back
310    
311          $error =~ s{at\s+(\S+)\s+line\s+(\d+)}          $error =~ s{at\s+(\S+)\s+line\s+(\d+)}
312                  {at <a target="editor" href="/editor+$1+$2">$1</a> line $2}gsm;                  {at <a target="editor" href="/editor+$1+$2">$1</a> line $2}gsm;
313    
# Line 556  sub backtrace { Line 562  sub backtrace {
562                  push @backtrace,                  push @backtrace,
563                          qq|via $package at $path line $line|;                          qq|via $package at $path line $line|;
564          }          }
565          warn "# backtrace: ", dump( @backtrace ) if @backtrace;          #warn "# backtrace: ", dump( @backtrace ) if @backtrace;
566          return @backtrace;          return @backtrace;
567  }  }
568    

Legend:
Removed from v.590  
changed lines
  Added in v.591

  ViewVC Help
Powered by ViewVC 1.1.26