/[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 800 by dpavlin, Wed Dec 10 20:27:34 2008 UTC revision 1133 by dpavlin, Tue Jun 30 15:10:55 2009 UTC
# Line 8  Frey::Pod - display documentation Line 8  Frey::Pod - display documentation
8  =cut  =cut
9    
10  extends 'Frey::Class::Loader';  extends 'Frey::Class::Loader';
11  with 'Frey::Web';  with 'Frey::Web', 'Frey::File';
 with 'Frey::File';  
12    
13  has 'class' => (  has 'class' => (
14          is => 'rw',          is => 'rw',
# Line 21  has 'class' => ( Line 20  has 'class' => (
20  use Pod::Find qw/pod_where/;  use Pod::Find qw/pod_where/;
21  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
22    
23    =head2 as_markup
24    
25     my $html = $o->as_markup;
26    
27     my ( $toc_html, $html ) = $o->as_markup;
28    
29    =cut
30    
31  sub as_markup {  sub as_markup {
32          my $self = shift;          my $self = shift;
33          my $class = $self->class;          my $class = $self->class;
# Line 84  sub as_markup { Line 91  sub as_markup {
91                  $toc_html .= qq|<li title="$level">$target</li>\n|;                  $toc_html .= qq|<li title="$level">$target</li>\n|;
92          }          }
93    
94          if ( $toc_html ) {          $toc_html .= qq|</ul>| while ( $current_level-- );
95    
96            if ( $toc_html && ! wantarray ) {
97                  $self->add_css(qq|                  $self->add_css(qq|
98                          .pod-toc {                          .pod-toc {
99                                  float: right;                                  float: right;
# Line 115  sub as_markup { Line 124  sub as_markup {
124                  }                  }
125          |);          |);
126    
127          return $toc_html . $body;          return ( $toc_html , $body ) if wantarray;
128            return   $toc_html . $body;
129    
130  }  }
131    
132  1;  __PACKAGE__->meta->make_immutable;
133    no Moose;
134    
135    1;

Legend:
Removed from v.800  
changed lines
  Added in v.1133

  ViewVC Help
Powered by ViewVC 1.1.26