summaryrefslogtreecommitdiff
path: root/lib/MooseX/Net/API/Meta/Class.pm
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2009-12-08 10:35:46 +0100
committerfranck cuny <franck@lumberjaph.net>2009-12-08 10:35:46 +0100
commita2b7ab98ccb7083ad6bdda0839a1e2e6e21ea847 (patch)
tree309219b95ca9846f53cc078a01baa2577d3399ab /lib/MooseX/Net/API/Meta/Class.pm
parentChecking in changes prior to tagging of version 0.01. Changelog diff is: (diff)
parentsmall updates to tests (diff)
downloadmoosex-net-api-a2b7ab98ccb7083ad6bdda0839a1e2e6e21ea847.tar.gz
Merge branch 'topic/create_tests'
* topic/create_tests: small updates to tests add a catalyst app to tests add basic tests remove meta class and method move meta class and method to new file, add meta to handle tests
Diffstat (limited to '')
-rw-r--r--lib/MooseX/Net/API/Meta/Class.pm34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/MooseX/Net/API/Meta/Class.pm b/lib/MooseX/Net/API/Meta/Class.pm
new file mode 100644
index 0000000..80075f8
--- /dev/null
+++ b/lib/MooseX/Net/API/Meta/Class.pm
@@ -0,0 +1,34 @@
+package MooseX::Net::API::Meta::Class;
+
+use Moose::Role;
+use Moose::Meta::Class;
+use MooseX::Types::Moose qw(Str ArrayRef ClassName Object);
+
+has local_api_methods => (
+ traits => ['Array'],
+ is => 'ro',
+ isa => ArrayRef [Str],
+ required => 1,
+ default => sub { [] },
+ auto_deref => 1,
+ handles => { '_add_api_method' => 'push' },
+);
+has local_api_test_methods => (
+ traits => ['Array'],
+ is => 'ro',
+ isa => ArrayRef [Str],
+ required => 1,
+ default => sub { [] },
+ auto_deref => 1,
+ handles => { '_add_api_test_method' => 'push' },
+);
+
+sub _build_meta_class {
+ my $self = shift;
+ return Moose::Meta::Class->create_anon_class(
+ superclasses => [ $self->method_metaclass ],
+ cache => 1,
+ );
+}
+
+1;