\s*
\s*([^<>]+)\s*<\/p>\s*<\/div>/
? "$1 $_"
: "UNCATEGORIZED/$_";
+ $key = " $key" if $key =~ /^Core/;
$files{$key}{'path'} = $file_path;
$files{$key}{'name'} = $module_name;
$files{$key}{'desc'} = $parser->asString =~ /
\s*
\s*[^<>\-]+\-([^<>]+)\s*<\/p>\s*<\/div>/
@@ -129,3 +161,56 @@ sub read_file
}
}
}
+
+package LinkResolver;
+use Pod::ParseUtils;
+use base qw(Pod::Hyperlink);
+
+sub new
+{
+ my $class = shift;
+ my $css = shift;
+ my $self = $class->SUPER::new();
+ return $self;
+}
+
+sub node
+{
+ my $self = shift;
+ if($self->SUPER::type() eq 'page')
+ {
+ my $page = $self->SUPER::page();
+ my $suff = '';
+
+ if($page =~ /^SDL\b/)
+ {
+ $page =~ s/::([A-Z]+)/-$1/g;
+ $page =~ s/(.*)::(.*)/\/$1.html#$2/;
+ $page .= '.html' unless $page =~ /\.html/;
+
+ return $page;
+ }
+ else
+ {
+ return "http://search.cpan.org/perldoc?$page";
+ }
+ }
+ $self->SUPER::node(@_);
+}
+
+sub text
+{
+ my $self = shift;
+ return $self->SUPER::page() if($self->SUPER::type() eq 'page');
+ $self->SUPER::text(@_);
+}
+
+sub type
+{
+ my $self = shift;
+ return "hyperlink" if($self->SUPER::type() eq 'page');
+ $self->SUPER::type(@_);
+}
+
+1;
+