/[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 271 by dpavlin, Wed Nov 5 08:20:45 2008 UTC revision 346 by dpavlin, Sat Nov 15 16:29:26 2008 UTC
# Line 30  sub markup { Line 30  sub markup {
30          my $self = shift;          my $self = shift;
31          my $class = $self->class;          my $class = $self->class;
32          use Pod::Simple::HTML;          use Pod::Simple::HTML;
33          my $path = eval { $self->package_path( $class ) };          my $path = eval { $self->class_path( $class ) };
34          if ( $@ ) {          if ( $@ ) {
35                  warn $@;                  warn $@;
36                  return;                  my $error = $@;
37                    $error =~ s{\s+(\S+)\s+line\s+(\d+)}{ <a href="/editor$1+$2" target="editor">$1</a> line $2}gsm;
38                    return qq|<div class="error"><pre>$error</pre></div>|;
39          }          }
40          my $pod = read_file( $path );          my $pod = read_file( $path );
41          my $converter = Pod::Simple::HTML->new();          my $converter = Pod::Simple::HTML->new();
# Line 44  sub markup { Line 46  sub markup {
46          $body =~ s{.*?<body [^>]+>}{}s;          $body =~ s{.*?<body [^>]+>}{}s;
47          $body =~ s{</body>\s*</html>\s*$}{};          $body =~ s{</body>\s*</html>\s*$}{};
48          $body =~ s!%3A%3A!::!g;          $body =~ s!%3A%3A!::!g;
49          $body =~ s{<a href="http://search\.cpan\.org/perldoc\?($my_classes)"([^>]*)>}{<a href="/~/$1"$2>}g;          $body =~ s{<a href="http://search\.cpan\.org/perldoc\?($my_classes)"([^>]*)>}{<a href="/$1"$2>}g;
50          $body =~ s{<a href="http://(search\.cpan\.org)/([^"]+)"([^>]*)>}{<a target="$1" href="http://$1/$2"$3>}g;          $body =~ s{<a href="http://(search\.cpan\.org)/([^"]+)"([^>]*)>}{<a target="$1" href="http://$1/$2"$3>}g;
51          $body =~ s!</li>\n\t<ul>!<ul>!;          $body =~ s!</li>\n\t<ul>!<ul>!;
52          $body =~ s!</ul>!</ul></li>!;          $body =~ s!</ul>!</ul></li>!;

Legend:
Removed from v.271  
changed lines
  Added in v.346

  ViewVC Help
Powered by ViewVC 1.1.26