Basic doc for each module
[gitmo/MooseX-Role-Parameterized.git] / lib / MooseX / Role / Parameterized / Meta / Role / Parameterized.pm
index 56eae06..5fa6706 100644 (file)
@@ -1,38 +1,28 @@
-#!/usr/bin/env perl
 package MooseX::Role::Parameterized::Meta::Role::Parameterized;
 use Moose;
 extends 'Moose::Meta::Role';
 
+# ABSTRACT: metaclass for parameterized roles
+
+use MooseX::Role::Parameterized::Parameters;
+
 has parameters => (
-    is       => 'rw',
-    isa      => 'MooseX::Role::Parameterized::Parameters',
-    required => 1,
+    is  => 'rw',
+    isa => 'MooseX::Role::Parameterized::Parameters',
 );
 
-# we override get_method_map because this is an anonymous role, there's no
-# package to check
-sub get_method_map {
-    my $self = shift;
-
-    return $self->{'methods'} ||= {};
-}
+__PACKAGE__->meta->make_immutable;
+no Moose;
 
-# we override add_method because we don't want to install methods added through
-# this API; we just stick it in the method map
-sub add_method {
-    my ($self, $method_name, $method) = @_;
-    (defined $method_name && $method_name)
-    || Moose->throw_error("You must define a method name");
+1;
 
-    if (!blessed($method)) {
-        Moose->throw_error("You must pass a blessed method to add_method");
-    }
+__END__
 
-    $self->get_method_map->{$method_name} = $method;
-}
+=head1 DESCRIPTION
 
-__PACKAGE__->meta->make_immutable;
-no Moose;
+This is the metaclass for parameteriz-ed roles; that is, parameteriz-able roles
+with their parameters bound. All this actually provides is a place to store the
+L<parameters> object.
 
-1;
+=cut