Skip Menu |

This queue is for tickets about the CPAN-Mini-Webserver CPAN distribution.

Report information
The Basics
Id: 65532
Status: open
Priority: 0/
Queue: CPAN-Mini-Webserver

People
Owner: Nobody in particular
Requestors: MELEZHIK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.51
Fixed in: (no value)



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', } ); }
Hi Alexey, thanks for the feedback and suggestions. As for the cache timeout, sure, i'll implement that via a config file option or command line option. Not too sure how i'll do that yet, but i don't see ENV-mangling as the best way to go about it. I'll have to review how current configuration is handled. As for the POD not displaying right, can you please tell me which cpan modules at which versions exhibit problems so i can write proper tests for the fixes? (And actually make sure that the proposed patch fixes them. ;) )
Пнд Фев 07 10:15:57 2011, MITHALDU писал: Show quoted text
> Hi Alexey, thanks for the feedback and suggestions. > > As for the cache timeout, sure, i'll implement that via a config file > option or command line option. Not too sure how i'll do that yet, but
i Show quoted text
> don't see ENV-mangling as the best way to go about it. I'll have to > review how current configuration is handled. >
Yeah, ofcourse ENV-mangling was proposed as simple but not best solution, config-way is ok ((: Show quoted text
> As for the POD not displaying right, can you please tell me which
cpan Show quoted text
> modules at which versions exhibit problems so i can write proper
tests for the fixes? (And actually make sure that the proposed patch fixes them. ;) ) comming soon
Show quoted text
> As for the POD not displaying right, can you please tell me which
cpan Show quoted text
> modules at which versions exhibit problems so i can write proper
tests Show quoted text
> for the fixes? (And actually make sure that the proposed patch fixes > them. ;) )
you can test against this test module, wrote by me, it contains utf pod documentation (russian language) - http://search.cpan.org/~melezhik/ AMZ_TEST-v0.0.3/lib/AMZ/Test.pm