From 532eee2d51259330856ae6e866c756d6b1e678de Mon Sep 17 00:00:00 2001 From: doy Date: Fri, 24 Apr 2009 21:30:14 -0500 Subject: initial, pretty broken code --- lib/Class/Info/Method.pm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lib/Class/Info/Method.pm (limited to 'lib/Class/Info/Method.pm') diff --git a/lib/Class/Info/Method.pm b/lib/Class/Info/Method.pm new file mode 100644 index 0000000..43742c0 --- /dev/null +++ b/lib/Class/Info/Method.pm @@ -0,0 +1,22 @@ +package Class::Info::Method; +use Moose; + +has method => ( + is => 'ro', + isa => 'Class::MOP::Method', + required => 1, + handles => qr/.*/, +); + +sub BUILDARGS { + my $class = shift; + return { method => $_[0] } if @_ == 1; + return $class->SUPER::BUILDARGS(@_); +} + +sub as_string { + my $self = shift; + return $self->name . " (" . blessed($self->method) . ")"; +} + +1; -- cgit v1.2.3-54-g00ecf