From: Brian Cassidy Date: Wed, 28 Jun 2006 21:05:25 +0000 (+0000) Subject: fix the list of plugins in the debug output X-Git-Tag: 5.7099_04~450 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=6601f2ad5a8e7e9ab5633703a3e2b5307e402401 fix the list of plugins in the debug output --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 5521312..ec1b247 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -792,15 +792,7 @@ EOF } if ( $class->debug ) { - - my @plugins = (); - - { - no strict 'refs'; - @plugins = - map { $_ . ' ' . ( $_->VERSION || '' ) } - grep { /^Catalyst::Plugin/ } @{"$class\::ISA"}; - } + my @plugins = map { "$_ " . ( $_->VERSION || '' ) } $class->registered_plugins; if (@plugins) { my $t = Text::SimpleTable->new(74); @@ -900,12 +892,12 @@ sub uri_for { my $params = ( scalar @args && ref $args[$#args] eq 'HASH' ? pop @args : {} ); - for my $value ( values %$params ) { - my $isa_ref = ref $value; - if( $isa_ref and $isa_ref ne 'ARRAY' ) { - croak( "Non-array reference ($isa_ref) passed to uri_for()" ); - } - utf8::encode( $_ ) for grep { defined } $isa_ref ? @$value : $value; + for my $value ( values %$params ) { + my $isa_ref = ref $value; + if( $isa_ref and $isa_ref ne 'ARRAY' ) { + croak( "Non-array reference ($isa_ref) passed to uri_for()" ); + } + utf8::encode( $_ ) for grep { defined } $isa_ref ? @$value : $value; }; # join args with '/', or a blank string