Permalink
Browse files

Released version 0.18

  • Loading branch information...
1 parent c30cf5c commit ba330b3d2e50fb344c470f1f55091c1aaae06337 @ingydotnet committed Sep 11, 2011
Showing with 9 additions and 4 deletions.
  1. +5 −0 Changes
  2. +4 −4 lib/Mo.pm
View
@@ -1,4 +1,9 @@
---
+version: 0.18
+date: Sun Sep 11 09:52:30 CEST 2011
+changes:
+- Don't pollute namspace with _ (or anything)
+---
version: 0.17
date: Sun Sep 11 03:24:17 CEST 2011
changes:
View
@@ -1,4 +1,4 @@
-package Mo; require strict; require warnings; $Mo::VERSION = '0.17';
+package Mo; require strict; require warnings; $Mo::VERSION = '0.18';
sub import {strict->import;warnings->import;my $p=caller;@{$p.'::ISA'}=$_[0];
*{$p.'::extends'} = sub {@{(caller).'::ISA'}=@_;eval "require $_" for @_};
*{$p.'::has'} = sub { my ($n, %a) = @_; my($d,$b)=@a{qw(default builder)};
@@ -7,7 +7,7 @@ sub import {strict->import;warnings->import;my $p=caller;@{$p.'::ISA'}=$_[0];
$b ? sub { $#_ ? ($_[0]{$n} = $_[1]) : (exists $_[0]{$n})
? $_[0]{$n} : ($_[0]{$n} = $_[0]->$b) }
: sub { $#_ ? $_[0]{$n} = $_[1] : $_[0]{$n} } }; }
-sub _ { my ($a, $c) = @_; for my $p (@{$c."::ISA"}) { next if $p eq 'Mo';
- unshift @$a, $p; _($a, $p); } @$a; }
+my $i;$i = sub {my ($a, $c) = @_;for my $p (@{$c."::ISA"}) { next if $p eq 'Mo';
+ unshift @$a, $p; $i->($a, $p); } @$a; };
sub new { my $c=shift; my$s=bless{@_},$c;
- do{&{$_."::BUILD"}($s) if defined&{$_."::BUILD"}} for (_([$c],$c)); $s }
+ do{&{$_."::BUILD"}($s) if defined&{$_."::BUILD"}} for ($i->([$c],$c)); $s }

0 comments on commit ba330b3

Please sign in to comment.