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

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

revision 1033 by dpavlin, Wed Dec 10 20:27:34 2008 UTC revision 1034 by dpavlin, Tue Feb 3 21:24:02 2009 UTC
# Line 21  has 'class' => ( Line 21  has 'class' => (
21  use Pod::Find qw/pod_where/;  use Pod::Find qw/pod_where/;
22  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
23    
24    =head2 as_markup
25    
26     my $html = $o->as_markup;
27    
28     my ( $toc_html, $html ) = $o->as_markup;
29    
30    =cut
31    
32  sub as_markup {  sub as_markup {
33          my $self = shift;          my $self = shift;
34          my $class = $self->class;          my $class = $self->class;
# Line 84  sub as_markup { Line 92  sub as_markup {
92                  $toc_html .= qq|<li title="$level">$target</li>\n|;                  $toc_html .= qq|<li title="$level">$target</li>\n|;
93          }          }
94    
95          if ( $toc_html ) {          $toc_html .= qq|</ul>| while ( $current_level-- );
96    
97            if ( $toc_html && ! wantarray ) {
98                  $self->add_css(qq|                  $self->add_css(qq|
99                          .pod-toc {                          .pod-toc {
100                                  float: right;                                  float: right;
# Line 115  sub as_markup { Line 125  sub as_markup {
125                  }                  }
126          |);          |);
127    
128          return $toc_html . $body;          return ( $toc_html , $body ) if wantarray;
129            return   $toc_html . $body;
130    
131  }  }
132    

Legend:
Removed from v.1033  
changed lines
  Added in v.1034

  ViewVC Help
Powered by ViewVC 1.1.26