/[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 819 by dpavlin, Fri Dec 12 18:01:02 2008 UTC revision 835 by dpavlin, Sun Dec 14 14:13:35 2008 UTC
# Line 246  sub page { Line 246  sub page {
246          if ( ! $body ) {          if ( ! $body ) {
247                  my $run = $a->{run} || 'as_markup';                  my $run = $a->{run} || 'as_markup';
248                  warn "# no body, invoke $self->$run on ", ref($self);                  warn "# no body, invoke $self->$run on ", ref($self);
249                  eval {                  $body = $self->$run;
                         $body = $self->$run;  
                 };  
                 $body = $self->error( $@, '' ) if $@;  
250          }          }
251          if ( $self->content_type !~ m{html} ) {          if ( $self->content_type !~ m{html} ) {
252                  warn "# return only $self body ", $self->content_type;                  warn "# return only $self body ", $self->content_type;
# Line 386  sub error { Line 383  sub error {
383          }          }
384    
385          warn "ERROR: $error\n";          warn "ERROR: $error\n";
386            $self->add_icon('error');
387          return          return
388                  qq|<pre class="frey-error$fatal">|                  qq|<pre class="frey-error$fatal">|
389                  . $self->html_links( $error ) .                  . $self->html_links( $error ) .
# Line 466  sub DEMOLISH { Line 464  sub DEMOLISH {
464    
465  sub icon_path {  sub icon_path {
466          my ($self,$class,$variant) = @_;          my ($self,$class,$variant) = @_;
 #       $class ||= $self->title;  
467    
468          sub icon_exists {          sub icon_exists {
469                  my $class = shift;                  my $class = shift;
# Line 497  sub icon_path { Line 494  sub icon_path {
494  sub add_icon {  sub add_icon {
495          my ($self,$variant) = @_;          my ($self,$variant) = @_;
496    
497          my $class = ref($self);          my $class = $self->class if $self->can('class');
498          $class = $self->class if $self->can('class');          #$class ||= $self->title;
499            $class ||= ref($self);
500          my $icon_path = $self->icon_path( $class, $variant ) || return;          my $icon_path = $self->icon_path( $class, $variant ) || return;
501    
502          $icon_html .= qq|<link rel="icon" type="image/png" href="/$icon_path">|;          $icon_html .= qq|<link rel="icon" type="image/png" href="/$icon_path">|;

Legend:
Removed from v.819  
changed lines
  Added in v.835

  ViewVC Help
Powered by ViewVC 1.1.26