On Mon, Nov 03, 2008 at 07:18:46AM -0800, Bill Moseley wrote: > I know some of this has been discussed: > > http://www.mail-archive.com/catalyst@lists.scsys.co.uk/msg02634.html > > I installed Perl 5.10 and Catalyst 5.7015, and now "make test" > generates lots of: > > Name "Catalyst::Controller::setup_dispatcher" used only once: > possible typo at /usr/share/perl/5.10/NEXT.pm line 58.
I patched my NEXT.pm which seemed to suppress it. I've attached. Does just setting a scalar by the same name to undef seem like a reasonable way to suppress this noise? Hum, I see I've got 0.60_01 of NEXT.pm Not sure where I got that version, or if maybe that was some other hack I did locally at one point. Something makes me think NEXT.pm doesn't meet the standards of PBP. ;) -- Bill Moseley [EMAIL PROTECTED] Sent from my iMutt
--- NEXT.orig 2008-11-06 11:56:40.000000000 -0800 +++ NEXT.pm 2008-11-06 11:57:15.000000000 -0800 @@ -1,8 +1,9 @@ package NEXT; -$VERSION = '0.60_01'; +$VERSION = '0.60_02'; use Carp; use strict; + sub NEXT::ELSEWHERE::ancestors { my @inlist = shift; @@ -54,12 +55,24 @@ last if shift @forebears eq $caller_class } no strict 'refs'; - @{$NEXT::NEXT{$self,$wanted_method}} = - map { *{"${_}::$caller_method"}{CODE}||() } @forebears - unless $wanted_method eq 'AUTOLOAD'; - @{$NEXT::NEXT{$self,$wanted_method}} = - map { (*{"${_}::AUTOLOAD"}{CODE}) ? "${_}::AUTOLOAD" : ()} @forebears - unless @{$NEXT::NEXT{$self,$wanted_method}||[]}; + + unless ( $wanted_method eq 'AUTOLOAD' ) { + @{$NEXT::NEXT{$self,$wanted_method}} = + map { *{"${_}::$caller_method"}{CODE}||() } @forebears; + + # Suppress "used only once" warnings + ${"${_}::$caller_method"} = undef for @forebears; + } + + + unless ( @{$NEXT::NEXT{$self,$wanted_method}||[]} ) { + @{$NEXT::NEXT{$self,$wanted_method}} = + map { (*{"${_}::AUTOLOAD"}{CODE}) ? "${_}::AUTOLOAD" : ()} @forebears; + + # Suppress "used only once" warnings + ${"${_}::AUTOLOAD"} = undef for @forebears; + } + $NEXT::SEEN->{$self,*{$caller}{CODE}}++; } my $call_method = shift @{$NEXT::NEXT{$self,$wanted_method}};
_______________________________________________ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/