Skip to content

Instantly share code, notes, and snippets.

@dams
Created September 12, 2011 23:37
Show Gist options
  • Save dams/1212773 to your computer and use it in GitHub Desktop.
Save dams/1212773 to your computer and use it in GitHub Desktop.
--- a/src/Mo.pm
+++ b/src/Mo.pm
@@ -12,8 +12,8 @@ sub Mo'import {
my $d = $a{default}||$a{builder};
*{ $p . $n } = $d
? sub {
- return $#_ ? $$_{$n} = pop
- : ! exists $$_{$n} ? $$_{$n} = $_->$d
+ return $$_{$n} = $#_ ? pop
+ : ! exists $$_{$n} ? $_->$d
: $$_{$n} for @_
}
: sub { $#_ ? $_[0]{$n} = $_[1] : $_[0]{$n} }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment