Skip Menu |

This queue is for tickets about the CGI-Wiki-Simple CPAN distribution.

Report information
The Basics
Id: 4265
Status: new
Priority: 0/
Queue: CGI-Wiki-Simple

People
Owner: Nobody in particular
Requestors: tshinnic [...] io.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)



Subject: Misuse of CGI::Application run_modes() _might_ confuse
While investigating CGI::Application I came across your code in CGI-Wiki-Simple-0.12, file CGI/Wiki/Simple.pm, routine sub decode_runmode { :::: # Magic runmode decoding : my $runmodes = join "|", map { quotemeta } $self->run_modes; if ($q->path_info =~ m!^/($runmodes)/(.*)!) { I liked the idea and played with it. I was surprised to find that the values returned from C::A run_modes() were not just the meant to be visible keys but also the subroutine name values - the whole hash unrolled. Playing with it some more I changed it to: # devmsg "I saw run_modes of '@{[ $self->run_modes ]}'\n"; my %run_modes = $self->run_modes; # devmsg "I saw run_modes of '@{[ keys %run_modes ]}'\n"; my $knownrms = join "|", map { quotemeta } keys %run_modes; if( $pathinfo =~ m{^/($knownrms)[/?]?(.*)} ) { Don't know how it could be a problem, but since everyone's nervous about mis-interpreting URLs I thought I'd mention it.