summaryrefslogtreecommitdiffstats
path: root/lib/Class/Info/Method.pm
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2009-04-24 21:30:14 -0500
committerdoy <doy@tozt.net>2009-04-24 21:30:14 -0500
commit532eee2d51259330856ae6e866c756d6b1e678de (patch)
tree1b98161f5010c51e4e4122394c2e7ec13e540cce /lib/Class/Info/Method.pm
downloadclass-info-532eee2d51259330856ae6e866c756d6b1e678de.tar.gz
class-info-532eee2d51259330856ae6e866c756d6b1e678de.zip
initial, pretty broken code
Diffstat (limited to 'lib/Class/Info/Method.pm')
-rw-r--r--lib/Class/Info/Method.pm22
1 files changed, 22 insertions, 0 deletions
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;