summary refs log tree commit diff
path: root/lib/MooseX/Net/API/Meta/Method
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/MooseX/Net/API/Meta/Method/APIMethod.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/MooseX/Net/API/Meta/Method/APIMethod.pm b/lib/MooseX/Net/API/Meta/Method/APIMethod.pm
index 0f6a6e8..ac57edf 100644
--- a/lib/MooseX/Net/API/Meta/Method/APIMethod.pm
+++ b/lib/MooseX/Net/API/Meta/Method/APIMethod.pm
@@ -9,7 +9,7 @@ use MooseX::Types::Moose qw/Str ArrayRef/;
 
 has local_api_methods => (
     traits     => ['Array'],
-    is         => 'ro',
+    is         => 'rw',
     isa        => ArrayRef [Str],
     required   => 1,
     default    => sub { [] },
@@ -60,6 +60,13 @@ after add_net_api_method => sub {
     );
 };
 
+sub remove_net_api_method {
+    my ($meta, $name) = @_;
+    my @methods = grep { !/$name/ } $meta->get_all_api_methods;
+    $meta->local_api_methods(\@methods);
+    $meta->remove_method($name);
+}
+
 1;
 
 =head1 SYNOPSIS