Skip Menu |
 

This queue is for tickets about the Encode CPAN distribution.

Report information
The Basics
Id: 76186
Status: open
Priority: 0/
Queue: Encode

People
Owner: Nobody in particular
Requestors: nanis [...] cpan.org
Cc:
AdminCc:

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



Subject: Encode::Alias::find_alias fails if invoked as a function
Download (untitled) / with headers
text/plain 773b
See also the discussion on Stackoverflow: http://stackoverflow.com/questions/9956198/ The version of Encode::Alias on my system is 2.15. The problem is in: # Public, encouraged API is exported by default our @EXPORT = qw ( define_alias find_alias ); our @Alias; # ordered matching list our %Alias; # cached known aliases sub find_alias { require Encode; my $class = shift; my $find = shift; unless ( exists $Alias{$find} ) { find_alias does not take into account the possibility that it may be invoked as a function rather than a class method. A solution is to check if @_ == 1, and accordingly. Or, one can do something cute like: sub find_alias { require Encode; my $find = pop; my $class = pop || __PACKAGE__; ...


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.