Skip Menu |

This queue is for tickets about the Catalyst-Plugin-I18N-PathPrefix CPAN distribution.

Report information
The Basics
Id: 71568
Status: resolved
Priority: 0/
Queue: Catalyst-Plugin-I18N-PathPrefix

People
Owner: Nobody in particular
Requestors: mail [...] herbert-leitz.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.04
Fixed in: (no value)



Subject: Silence unnecessary warning
Line 237 in PathPrefix.pm $prefix = lc $prefix; produces an unnecessary warning (Use of uninitialized value...) if $prefix is undefined. Please change it into: $prefix = lc $prefix if defined $prefix or something similar.
Hi, first of all, sorry for the long response time.. (i was too busy when you reported it, and then unfortunately i forgot about it) I tried to reproduce it, but i was unable - could you tell me what Catalyst version and other relevant modules (esp. Catalyst plugins) you use? Anyways, i fixed the warning (just like you proposed:-) - it does not hurt to be more cautious. norbi On Mon Oct 10 07:05:39 2011, hl42 wrote: Show quoted text
> > Line 237 in PathPrefix.pm > > $prefix = lc $prefix; > > produces an unnecessary warning (Use of uninitialized value...) if > $prefix is undefined. Please change it into: > > $prefix = lc $prefix if defined $prefix > > or something similar.
Subject: Re: [rt.cpan.org #71568] Silence unnecessary warning
Date: Thu, 15 Dec 2011 18:31:38 +0100
To: bug-Catalyst-Plugin-I18N-PathPrefix [...] rt.cpan.org
From: Herbert Leitz <Herbert.Leitz [...] t-online.de>
Hi, thanks for fixing. My production setup is: use Catalyst qw/ ConfigLoader Authentication Authorization::Roles Session Session::State::Cookie Session::Store::DBI Scheduler I18N I18N::PathPrefix Unicode::Encoding /; Catalyst 5.80032 Catalyst::Devel 1.33 Catalyst::Plugin::ConfigLoader 0.30 Catalyst::Plugin::Authentication 0.10017 Catalyst::Plugin::Authorization::Roles 0.09 Catalyst::Plugin::Session 0.31 Catalyst::Plugin::Session::State::Cookie 0.17 Catalyst::Plugin::Session::Store::DBI 0.16 Catalyst::Plugin::Scheduler 0.10 Catalyst::Plugin::I18N 0.10 Catalyst::Plugin::I18N::PathPrefix 0.04 Catalyst::Plugin::Unicode::Encoding 1.1 I tried to reproduce it with a minimal setup and found two other warnings instead. Here is what I did: ~> catalyst.pl MyApp ~> cd MyApp ~/MyApp> vi lib/MyApp.pm [add I18N and I18N::PathPrefix to plugins] ~/MyApp> perl Makefile.PL ~/MyApp> make test ... [info] MyApp powered by Catalyst 5.80032 Use of uninitialized value in regexp compilation at /home/hl/perl5/lib/perl5/Catalyst/Plugin/I18N/PathPrefix.pm line 235. Use of uninitialized value $language_code in lc at /home/hl/perl5/lib/perl5/Catalyst/Plugin/I18N/PathPrefix.pm line 324. [info] *** Request 1 (1.000/s) [28799] [Thu Dec 15 18:00:50 2011] *** [debug] "GET" request for "/" from "127.0.0.1" [debug] Path is "/" [debug] Response Code: 200; Content-Type: text/html; charset=utf-8; Content- Length: 5608 ... Hope this helps Herbert Am Samstag, 26. November 2011 12:50:38 schrieben Sie: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=71568 > > > Hi, > > first of all, sorry for the long response time.. (i was too busy when > you reported it, and then unfortunately i forgot about it) > > I tried to reproduce it, but i was unable - could you tell me what > Catalyst version and other relevant modules (esp. Catalyst plugins) you > use? > > Anyways, i fixed the warning (just like you proposed:-) - it does not > hurt to be more cautious. > > norbi > > On Mon Oct 10 07:05:39 2011, hl42 wrote:
> > Line 237 in PathPrefix.pm > > > > $prefix = lc $prefix; > > > > produces an unnecessary warning (Use of uninitialized value...) if > > > > $prefix is undefined. Please change it into: > > $prefix = lc $prefix if defined $prefix > > > > or something similar.