MooseX-FollowPBP-0.05000755001750001750 011532246404 14714 5ustar00autarchautarch000000000000README000644001750001750 40411532246402 15630 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05 This archive contains the distribution MooseX-FollowPBP, version 0.05: Name your accessors get_foo() and set_foo() This software is Copyright (c) 2011 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) Changes000644001750001750 120611532246402 16264 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.050.05 2011-02-26 - In Moose 1.9900+, attributes from roles no longer acquire the consuming class's attribute traits. However, you can apply attribute traits like this one to attributes in roles, and that trait is preserved when the role is applied to a class. See the documentation for more details. 0.04 2010-07-20 - Respect "is => 'bare'" attributes. 0.03 2010-07-14 - Use modern Moose APIs, to avoid warnings with the next Moose release. 0.02 2008-02-06 - Add a missing dependency on Moose so it gets tested. 0.01 2008-12-16 - This code was extracted from Moose::Policy, and works without needing said module. LICENSE000644001750001750 2152011532246402 16017 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05This software is Copyright (c) 2011 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) The Artistic License 2.0 Copyright (c) 2000-2006, The Perl Foundation. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software. You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement. Definitions "Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package. "Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures. "You" and "your" means any person who would like to copy, distribute, or modify the Package. "Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. "Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. "Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees. "Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. "Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. "Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future. "Source" form means the source code, documentation source, and configuration files for the Package. "Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form. Permission for Use and Modification Without Distribution (1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. Permissions for Redistribution of the Standard Version (2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. (3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License. Distribution of Modified Versions of the Package as Source (4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following: (a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version. (b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version. (c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under (i) the Original License or (ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee received, and requires that the Source form of the Modified Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed. Distribution of Compiled Forms of the Standard Version or Modified Versions without the Source (5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license. (6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version. Aggregating or Linking the Package (7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation. (8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package. Items That are Not Considered Part of a Modified Version (9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license. General Provisions (10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. (11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license. (12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. (13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed. (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. INSTALL000644001750001750 172611532246402 16031 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05 This is the Perl distribution MooseX-FollowPBP. Installing MooseX-FollowPBP is straightforward. ## Installation with cpanm If you have cpanm, you only need one line: % cpanm MooseX::FollowPBP If you are installing into a system-wide directory, you may need to pass the "-S" flag to cpanm, which uses sudo to install the module: % cpanm -S MooseX::FollowPBP ## Installing with the CPAN shell Alternatively, if your CPAN shell is set up, you should just be able to do: % cpan MooseX::FollowPBP ## Manual installation As a last resort, you can manually install it. Download the tarball, untar it, then build it: % perl Makefile.PL % make && make test Then install it: % make install If you are installing into a system-wide directory, you may need to run: % sudo make install ## Documentation MooseX-FollowPBP documentation is available as POD. You can run perldoc from a shell to read the documentation: % perldoc MooseX::FollowPBP dist.ini000644001750001750 132411532246402 16436 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05name = MooseX-FollowPBP author = Dave Rolsky license = Artistic_2_0 copyright_holder = Dave Rolsky copyright_year = 2011 version = 0.05 [@Basic] [InstallGuide] [MetaJSON] [MetaResources] bugtracker.web = http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooseX-FollowPBP bugtracker.mailto = bug-moosex-semiaffordanceaccessor@rt.cpan.org repository.url = git://git.moose.perl.org/MooseX-FollowPBP.git repository.web = http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo/MooseX-FollowPBP.git;a=summary repository.type = git [PodWeaver] [PkgVersion] [PodTests] [NoTabsTests] [EOLTests] [Signature] [CheckChangeLog] [Prereqs] Moose = 1.16 [Prereqs / TestRequires] Test::More = 0.88 [@Git] t000755001750001750 011532246402 15076 5ustar00autarchautarch000000000000MooseX-FollowPBP-0.05role.t000644001750001750 120411532246402 16360 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05/tuse strict; use warnings; use Test::More; use Moose (); plan skip_all => 'This test requires Moose 1.9900+' unless $Moose::VERSION ge '1.9900'; { package Role::SAA; use Moose::Role; use MooseX::FollowPBP; has 'foo' => ( is => 'rw' ); has '_bar' => ( is => 'rw' ); } { package Class; use Moose; with 'Role::SAA'; has 'thing' => ( is => 'rw' ); has '_private' => ( is => 'rw' ); } can_ok( 'Class', 'thing' ); ok( ! Class->can('set_thing') ); can_ok( 'Class', '_private' ); ok( ! Class->can('_set_private') ); can_ok( 'Class', qw( get_foo set_foo _get_bar _set_bar ) ); done_testing(); META.yml000644001750001750 113411532246402 16242 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05--- abstract: 'Name your accessors get_foo() and set_foo()' author: - 'Dave Rolsky ' build_requires: Test::More: 0.88 configure_requires: ExtUtils::MakeMaker: 6.31 dynamic_config: 0 generated_by: 'Dist::Zilla version 4.200004, CPAN::Meta::Converter version 2.110240' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 name: MooseX-FollowPBP requires: Moose: 1.16 resources: bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooseX-FollowPBP repository: git://git.moose.perl.org/MooseX-FollowPBP.git version: 0.05 MANIFEST000644001750001750 42611532246402 16105 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05Changes INSTALL LICENSE MANIFEST META.json META.yml Makefile.PL README SIGNATURE dist.ini lib/MooseX/FollowPBP.pm lib/MooseX/FollowPBP/Role/Attribute.pm t/basic.t t/release-eol.t t/release-no-tabs.t t/release-pod-coverage.t t/release-pod-spell.t t/release-pod-syntax.t t/role.t basic.t000644001750001750 324211532246402 16504 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05/tuse strict; use warnings; use Test::More; { package Standard; use Moose; has 'thing' => ( is => 'rw' ); has '_private' => ( is => 'rw' ); } { package PBP; use Moose; use MooseX::FollowPBP; has 'thing' => ( is => 'rw' ); has '_private' => ( is => 'rw' ); } { package PBP3; use Moose; use MooseX::FollowPBP; has 'ro' => ( is => 'ro' ); has 'thing' => ( is => 'rw', reader => 'thing' ); has 'thing2' => ( is => 'rw', writer => 'set_it' ); } { package PBP4; use Moose; use MooseX::FollowPBP; has 'bare' => ( is => 'bare' ); } ok( ! Standard->can('get_thing'), 'Standard->get_thing() does not exist' ); ok( ! Standard->can('set_thing'), 'Standard->set_thing() does not exist' ); ok( ! Standard->can('_get_private'), 'Standard->_get_private() does not exist' ); ok( ! Standard->can('_set_private'), 'Standard->_set_private() does not exist' ); ok( PBP->can('get_thing'), 'PBP->get_thing() exists' ); ok( PBP->can('set_thing'), 'PBP->set_thing() exists' ); ok( PBP->can('_get_private'), 'PBP->_get_private() exists' ); ok( PBP->can('_set_private'), 'PBP->_set_private() exists' ); ok( PBP3->can('get_ro'), 'PBP3->get_ro exists' ); ok( ! PBP3->can('set_ro'), 'PBP3->set_ro does not exist' ); ok( ! PBP3->can('get_thing'), 'PBP3->get_thing does not exist' ); ok( ! PBP3->can('set_thing'), 'PBP3->set_thing does not exist' ); ok( ! PBP3->can('get_thing2'), 'PBP3->get_thing2 does not exist' ); ok( ! PBP3->can('set_thing2'), 'PBP3->set_thing2 does not exist' ); ok( !PBP4->can('get_bare'), 'is => bare attribute is respected' ); ok( !PBP4->can('set_bare'), 'is => bare attribute is respected' ); done_testing(); META.json000644001750001750 232111532246402 16411 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05{ "abstract" : "Name your accessors get_foo() and set_foo()", "author" : [ "Dave Rolsky " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 4.200004, CPAN::Meta::Converter version 2.110240", "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : "2" }, "name" : "MooseX-FollowPBP", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.31" } }, "runtime" : { "requires" : { "Moose" : "1.16" } }, "test" : { "requires" : { "Test::More" : "0.88" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-moosex-semiaffordanceaccessor@rt.cpan.org", "web" : "http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooseX-FollowPBP" }, "repository" : { "type" : "git", "url" : "git://git.moose.perl.org/MooseX-FollowPBP.git", "web" : "http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo/MooseX-FollowPBP.git;a=summary" } }, "version" : "0.05" } SIGNATURE000644001750001750 344411532246404 16265 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05This file contains message digests of all files listed in MANIFEST, signed via the Module::Signature module, version 0.66. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: % cpansign -v It will check each file's integrity, as well as the signature's validity. If "==> Signature verified OK! <==" is not displayed, the distribution may already have been compromised, and you should not run its Makefile.PL or Build.PL. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 SHA1 abf5ca34a025f45c72a145830f9fef34677a0a9c Changes SHA1 27291faeba400eab6879fdc0b00e3e53e47233e7 INSTALL SHA1 c715d20265d2931c7564fc64abfdc4f8ff33e297 LICENSE SHA1 35d3f4ec9c322624a3bd6ee78a260ba6851a40e7 MANIFEST SHA1 3bb9eb6d3ea2285d2caf65fd9ffd79613c11f529 META.json SHA1 45c628d53551ee1091ae64d742aa2313dc94e747 META.yml SHA1 99c1e7f806ff1b92f42049e7bc9b16c438d7cdcd Makefile.PL SHA1 70b09749ec37ef7a7f4c852119f31e5e9e9d60c5 README SHA1 9e0946ba098a68edc9204cff12ed21a3331bec8e dist.ini SHA1 1ee2a9b16b8d6f22f59412f659fde708dfd404e2 lib/MooseX/FollowPBP.pm SHA1 823a4ff0b528ab8536d54b7f438ee092f2a4c9e7 lib/MooseX/FollowPBP/Role/Attribute.pm SHA1 33235c2593361ec8d256ff6dc65fdd7646189c40 t/basic.t SHA1 a032c41ef6887fab1b900669c2d304fab46680e2 t/release-eol.t SHA1 455d1dd1867212a665ad5ea4126b572411de300c t/release-no-tabs.t SHA1 9433c240fe590bc404ab68ff63984df763e347ed t/release-pod-coverage.t SHA1 cb3e2ea10fc7e63d3c8c82561439919d5780bace t/release-pod-spell.t SHA1 9775e90d40f094f3e5a23c695d6e6e436a2232c3 t/release-pod-syntax.t SHA1 2a2ce8b635d1df973c5ca6656261faedbd84e90f t/role.t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk1pTQIACgkQIgMCsV8qvRLsnACfbIS/o1VoWRjqhX+ePfltsahM LhIAnjwr0Bjaz9hWxZcvudv0l+QlzDyj =wdkv -----END PGP SIGNATURE----- Makefile.PL000644001750001750 201611532246402 16743 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05 use strict; use warnings; use ExtUtils::MakeMaker 6.31; my %WriteMakefileArgs = ( 'ABSTRACT' => 'Name your accessors get_foo() and set_foo()', 'AUTHOR' => 'Dave Rolsky ', 'BUILD_REQUIRES' => { 'Test::More' => '0.88' }, 'CONFIGURE_REQUIRES' => { 'ExtUtils::MakeMaker' => '6.31' }, 'DISTNAME' => 'MooseX-FollowPBP', 'EXE_FILES' => [], 'LICENSE' => 'artistic_2', 'NAME' => 'MooseX::FollowPBP', 'PREREQ_PM' => { 'Moose' => '1.16' }, 'VERSION' => '0.05', 'test' => { 'TESTS' => 't/*.t' } ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) { my $br = delete $WriteMakefileArgs{BUILD_REQUIRES}; my $pp = $WriteMakefileArgs{PREREQ_PM}; for my $mod ( keys %$br ) { if ( exists $pp->{$mod} ) { $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod}; } else { $pp->{$mod} = $br->{$mod}; } } } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); release-eol.t000644001750001750 47611532246402 17606 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05/t BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; eval 'use Test::EOL'; plan skip_all => 'Test::EOL required' if $@; all_perl_files_ok({ trailing_whitespace => 1 }); release-no-tabs.t000644001750001750 45011532246402 20362 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05/t BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; eval 'use Test::NoTabs'; plan skip_all => 'Test::NoTabs required' if $@; all_perl_files_ok(); release-pod-spell.t000644001750001750 134211532246402 20737 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05/t BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use strict; use warnings; use Test::More; eval "use Test::Spelling"; plan skip_all => "Test::Spelling required for testing POD coverage" if $@; my @stopwords; for () { chomp; push @stopwords, $_ unless /\A (?: \# | \s* \z)/msx; # skip comments, whitespace } add_stopwords(@stopwords); set_spell_cmd('aspell list -l en'); # This prevents a weird segfault from the aspell command - see # https://bugs.launchpad.net/ubuntu/+source/aspell/+bug/71322 local $ENV{LC_ALL} = 'C'; all_pod_files_spelling_ok(); __DATA__ PayPal affordance attribute's init release-pod-syntax.t000644001750001750 45011532246402 21125 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::Pod 1.00"; plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; all_pod_files_ok(); MooseX000755001750001750 011532246402 16613 5ustar00autarchautarch000000000000MooseX-FollowPBP-0.05/libFollowPBP.pm000644001750001750 475511532246402 21127 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05/lib/MooseXpackage MooseX::FollowPBP; BEGIN { $MooseX::FollowPBP::VERSION = '0.05'; } use strict; use warnings; use Moose 0.94 (); use Moose::Exporter; use Moose::Util::MetaRole; use MooseX::FollowPBP::Role::Attribute; my %metaroles = ( class_metaroles => { attribute => ['MooseX::FollowPBP::Role::Attribute'], }, ); $metaroles{role_metaroles} = { applied_attribute => ['MooseX::FollowPBP::Role::Attribute'], } if $Moose::VERSION >= 1.9900; Moose::Exporter->setup_import_methods(%metaroles); 1; # ABSTRACT: Name your accessors get_foo() and set_foo() =pod =head1 NAME MooseX::FollowPBP - Name your accessors get_foo() and set_foo() =head1 VERSION version 0.05 =head1 SYNOPSIS use Moose; use MooseX::FollowPBP; # make some attributes =head1 DESCRIPTION This module does not provide any methods. Simply loading it changes the default naming policy for the loading class so that accessors are separated into get and set methods. The get methods are prefixed with "get_" as the accessor, while set methods are prefixed with "set_". This is the naming style recommended by Damian Conway in I. If you define an attribute with a leading underscore, then both the get and set method will also have an underscore prefix. If you explicitly set a "reader" or "writer" name when creating an attribute, then that attribute's naming scheme is left unchanged. =head1 ACCESSORS IN ROLES Prior to version 1.9900 of L, attributes added to a class ended up with that class's attribute traits. That means that if your class used C, any attributes provided by roles you consumed had the semi-affordance style of accessor. As of Moose 1.9900, that is no longer the case. Attributes provided by roles no longer acquire the consuming class's attribute traits. However, with Moose 1.9900+, you can now use C directly in roles. Attributes defined by that role will have semi-affordance style accessors, regardless of what attribute traits the consuming class has. =head1 BUGS Please report any bugs or feature requests to 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 AUTHOR Dave Rolsky =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2011 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut __END__ release-pod-coverage.t000644001750001750 76511532246402 21403 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05/t#!perl BEGIN { unless ($ENV{RELEASE_TESTING}) { require Test::More; Test::More::plan(skip_all => 'these tests are for release candidate testing'); } } use Test::More; eval "use Test::Pod::Coverage 1.08"; plan skip_all => "Test::Pod::Coverage 1.08 required for testing POD coverage" if $@; eval "use Pod::Coverage::TrustPod"; plan skip_all => "Pod::Coverage::TrustPod required for testing POD coverage" if $@; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); Role000755001750001750 011532246402 21320 5ustar00autarchautarch000000000000MooseX-FollowPBP-0.05/lib/MooseX/FollowPBPAttribute.pm000644001750001750 303111532246402 23755 0ustar00autarchautarch000000000000MooseX-FollowPBP-0.05/lib/MooseX/FollowPBP/Rolepackage MooseX::FollowPBP::Role::Attribute; BEGIN { $MooseX::FollowPBP::Role::Attribute::VERSION = '0.05'; } use strict; use warnings; use Moose::Role; before _process_options => sub { my $class = shift; my $name = shift; my $options = shift; if ( exists $options->{is} && !( exists $options->{reader} || exists $options->{writer} ) && $options->{is} ne 'bare' ) { my $get; my $set; if ( $name =~ s/^_// ) { $get = '_get_'; $set = '_set_'; } else { $get = 'get_'; $set = 'set_'; } $options->{reader} = $get . $name; if ( $options->{is} eq 'rw' ) { $options->{writer} = $set . $name; } delete $options->{is}; } }; no Moose::Role; 1; __END__ =pod =head1 NAME MooseX::FollowPBP::Role::Attribute =head1 VERSION version 0.05 =head1 SYNOPSIS Moose::Util::MetaRole::apply_metaclass_roles( for => $p{for_class}, class_metaroles => { attribute => ['MooseX::FollowPBP::Role::Attribute'], }, ); =head1 DESCRIPTION This role applies a method modifier to the C<_process_options()> method, and tweaks the reader and writer parameters so that they follow the style recommended in I. =head1 AUTHOR Dave Rolsky =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2011 by Dave Rolsky. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut