Skip Menu |

This queue is for tickets about the Encode CPAN distribution.

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

Owner: Nobody in particular
Requestors: nanis [...]

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: 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 infrastructure.

Please report any issues with to