Skip to content

Instantly share code, notes, and snippets.

@rassie
Created January 29, 2009 21:20
Show Gist options
  • Save rassie/54756 to your computer and use it in GitHub Desktop.
Save rassie/54756 to your computer and use it in GitHub Desktop.
*loc = \&localize;
sub localize {
my $c = shift;
$c->languages;
no strict 'refs';
return &{ ref($c) . '::_loc' }( $_[0], @{ $_[1] } )
if ( ref $_[1] eq 'ARRAY' );
return &{ ref($c) . '::_loc' }(@_);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment