* On Tue, Mar 18 2008, Bill Moseley wrote: > The plugin decodes all parameters using: > > $_ = $c->encoding->decode( $_, $CHECK ) for ( ref($value) ? @{$value} : > $value ); > > > I'd think it would be wise to check to see if the string is already > decoded: > > for ( ref($value) ? @{$value} : $value ) { > next if Encode::is_utf8($_); > $_ = $c->encoding->decode( $_, $CHECK ); > }
Never check is_utf8. Encode will do the right thing regardless of the internal representation of the string. http://blog.jrock.us/articles/Fuck%20the%20internal%20representation.pod Regards, Jonathan Rockway -- print just => another => perl => hacker => if $,=$" _______________________________________________ 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/