X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FClassAttribute.pm;h=0c3c91d197c8a2a07e6b124c06458576fb6c65ed;hb=e9336c24bf98c9ef6f771fef0cc149cb08c36850;hp=8572aaea4932a7f338733049b63e49bc0cb7a0ae;hpb=eeee5ccb10fe2f92415751b2f721a89798393c29;p=gitmo%2FMooseX-ClassAttribute.git diff --git a/lib/MooseX/ClassAttribute.pm b/lib/MooseX/ClassAttribute.pm index 8572aae..0c3c91d 100644 --- a/lib/MooseX/ClassAttribute.pm +++ b/lib/MooseX/ClassAttribute.pm @@ -3,36 +3,26 @@ package MooseX::ClassAttribute; use strict; use warnings; -our $VERSION = '0.12'; -our $AUTHORITY = 'cpan:DROLSKY'; - -use Moose 0.98 (); +use Moose 1.15 (); use Moose::Exporter; use MooseX::ClassAttribute::Trait::Class; use MooseX::ClassAttribute::Trait::Role; use MooseX::ClassAttribute::Trait::Application::ToClass; use MooseX::ClassAttribute::Trait::Application::ToRole; -Moose::Exporter->setup_import_methods( with_meta => ['class_has'] ); - -sub init_meta { - shift; - my %p = @_; - - return Moose::Util::MetaRole::apply_metaclass_roles( - for => $p{for_class}, - class_metaroles => { - class => ['MooseX::ClassAttribute::Trait::Class'], - }, - role_metaroles => { - role => ['MooseX::ClassAttribute::Trait::Role'], - application_to_class => - ['MooseX::ClassAttribute::Trait::Application::ToClass'], - application_to_role => - ['MooseX::ClassAttribute::Trait::Application::ToRole'], - }, - ); -} +Moose::Exporter->setup_import_methods( + with_meta => ['class_has'], + class_metaroles => { + class => ['MooseX::ClassAttribute::Trait::Class'], + }, + role_metaroles => { + role => ['MooseX::ClassAttribute::Trait::Role'], + application_to_class => + ['MooseX::ClassAttribute::Trait::Application::ToClass'], + application_to_role => + ['MooseX::ClassAttribute::Trait::Application::ToRole'], + }, +); sub class_has { my $meta = shift; @@ -46,14 +36,12 @@ sub class_has { 1; +# ABSTRACT: Declare class attributes Moose-style + __END__ =pod -=head1 NAME - -MooseX::ClassAttribute - Declare class attributes Moose-style - =head1 SYNOPSIS package My::Class; @@ -109,10 +97,6 @@ provides introspection methods for class attributes. Class attributes themselves do the L role. -There is also a L -which provides part of the inlining implementation for class -attributes. - =head2 Cooperation with Metaclasses and Traits This module should work with most attribute metaclasses and traits, @@ -147,10 +131,6 @@ To donate, log into PayPal and send money to autarch@urth.org or use the button on this page: L -=head1 AUTHOR - -Dave Rolsky, C<< >> - =head1 BUGS Please report any bugs or feature requests to @@ -158,11 +138,4 @@ C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. -=head1 COPYRIGHT & LICENSE - -Copyright 2007-2010 Dave Rolsky, All Rights Reserved. - -This program is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. - =cut