Subject: | 1) want to setup cash ttl parameter as env var or command line option 2) utf8 bug for pod documentation 3) no pod doc handler |
I'd like to report about these 3 issues:
1) necessity for setting up "cash ttl parameter" as env var or command
line option
2) for some encodings pod document is not shown correctly
3) workaround in case module has not pod documentation
Sample patch is attached
Subject: | patch1.txt |
--- /usr/local/lib/perl5/site_perl/5.8.9/CPAN/Mini/Webserver.pm 2011-01-30 18:57:54.000000000 +0300
+++ /home/melezhik/sandbox/utils/cpan/patches/Webserver.pm 2011-02-07 17:47:21.000000000 +0300
@@ -115,7 +115,7 @@
&& ( -f $authors_filename )
&& ( -f $packages_filename );
- my %cache_opts = ( ttl => 60 * 60 );
+ my %cache_opts = ( ttl => $ENV{CASH_TTL} * $ENV{CASH_TTL} );
$cache_opts{directory} = $cache_dir if $cache_dir;
my $cache = App::Cache->new( \%cache_opts );
@@ -455,7 +455,7 @@
$parser->no_whining( 1 );
$parser->no_errata_section( 1 );
$parser->output_string( \my $html );
- $parser->parse_string_document( $contents );
+ $parser->parse_string_document("=encoding utf-8\n\n=cut\n\n".$contents);
$html =~ s/^.*<!-- start doc -->//s;
$html =~ s/<!-- end doc -->.*$//s;
@@ -468,8 +468,8 @@
pauseid => $pauseid,
distvname => $distvname,
filename => $filename,
- contents => $contents,
- html => $html,
+ contents => $parser->content_seen ? $contents : 'no pod documentation found',
+ html => $parser->content_seen ? $html : 'no pod documentation found',
}
);
}