From: gfx Date: Thu, 8 Oct 2009 09:46:35 +0000 (+0900) Subject: Add note to general methods X-Git-Tag: 0.37_04~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fc8628e3caca3f21818dc6b9e1541c92767ffb57;p=gitmo%2FMouse.git Add note to general methods --- diff --git a/lib/Mouse/Util.pm b/lib/Mouse/Util.pm index 9d5346c..4356daa 100644 --- a/lib/Mouse/Util.pm +++ b/lib/Mouse/Util.pm @@ -321,11 +321,13 @@ sub not_supported{ Carp::confess("Mouse does not currently support $feature"); } -sub meta{ +# general meta() method +sub meta :method{ return Mouse::Meta::Class->initialize(ref($_[0]) || $_[0]); } -sub dump { +# general dump() method +sub dump :method { my($self, $maxdepth) = @_; require 'Data/Dumper.pm'; # we don't want to create its namespace @@ -335,6 +337,7 @@ sub dump { return $dd->Dump(); } +# general does() method sub does :method; *does = \&does_role; # alias