summaryrefslogtreecommitdiffstats
path: root/lib/Class/Info/Method.pm
diff options
context:
space:
mode:
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;