From: Stevan Little Date: Thu, 13 Dec 2007 18:19:09 +0000 (+0000) Subject: foo X-Git-Tag: 0_51~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f430cfa43be4ce7885da32f8ac5dfe13076cd841;p=gitmo%2FClass-MOP.git foo --- diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index 7f2cbc5..c789d06 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -895,6 +895,8 @@ Rob (robkinyon) Kinyon Yuval (nothingmuch) Kogman +Scott (konobi) McWhirter + =head1 COPYRIGHT AND LICENSE Copyright 2006, 2007 by Infinity Interactive, Inc. diff --git a/lib/Class/MOP/Package.pm b/lib/Class/MOP/Package.pm index 3020727..0fa340a 100644 --- a/lib/Class/MOP/Package.pm +++ b/lib/Class/MOP/Package.pm @@ -75,7 +75,7 @@ sub namespace { (defined $variable) || confess "You must pass a variable name"; - my ($sigil, $name) = ($variable =~ /^(.)(.*)$/); + my $sigil = substr($variable, 0, 1, ''); (defined $sigil) || confess "The variable name must include a sigil"; @@ -83,7 +83,7 @@ sub namespace { (exists $SIGIL_MAP{$sigil}) || confess "I do not recognize that sigil '$sigil'"; - return ($name, $sigil, $SIGIL_MAP{$sigil}); + return ($variable, $sigil, $SIGIL_MAP{$sigil}); } }