r36055 - in /branches/upstream/libmoosex-semiaffordanceaccessor-perl: ./ current/ current/lib/ current/lib/MooseX/ current/lib/MooseX/SemiAffordanceAccessor/ current/lib/MooseX/SemiAffordanceAccessor/Role/ current/t/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Thu May 21 19:20:01 UTC 2009
Author: jawnsy-guest
Date: Thu May 21 19:19:56 2009
New Revision: 36055
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=36055
Log:
[svn-inject] Installing original source of libmoosex-semiaffordanceaccessor-perl
Added:
branches/upstream/libmoosex-semiaffordanceaccessor-perl/
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/Build.PL
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/Changes
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/MANIFEST
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/META.yml
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/Makefile.PL
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/README
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/SIGNATURE
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/lib/
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/lib/MooseX/
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/lib/MooseX/SemiAffordanceAccessor/
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/lib/MooseX/SemiAffordanceAccessor.pm
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/lib/MooseX/SemiAffordanceAccessor/Role/
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/lib/MooseX/SemiAffordanceAccessor/Role/Attribute.pm
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/basic.t
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/pod-coverage.t
branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/pod.t
Added: branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/Build.PL?rev=36055&op=file
==============================================================================
--- branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/Build.PL (added)
+++ branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/Build.PL Thu May 21 19:19:56 2009
@@ -1,0 +1,20 @@
+use strict;
+use warnings;
+
+require 5.00601;
+
+use Module::Build;
+
+my $builder = Module::Build->new
+ ( module_name => 'MooseX::SemiAffordanceAccessor',
+ license => 'perl',
+ requires => { 'Moose' => '0.55_04',
+ },
+ build_requires => { 'Test::More' => '0',
+ },
+ create_makefile_pl => 'passthrough',
+ create_readme => 1,
+ sign => 1,
+ );
+
+$builder->create_build_script();
Added: branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/Changes?rev=36055&op=file
==============================================================================
--- branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/Changes (added)
+++ branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/Changes Thu May 21 19:19:56 2009
@@ -1,0 +1,19 @@
+0.03 2008-08-30
+
+- Renamed to MooseX::SemiAffordanceAccessor because it no longer
+ requires the Moose::Policy module. Instead it uses
+ Moose::Util::MetaRole.
+
+
+0.02 2007-11-15
+
+- Require 5.6.1 in the Build.PL.
+
+- Added missing Moose & Moose::Policy prereqs.
+
+- No code changes.
+
+
+0.01 2007-11-14
+
+- First version, released on an unsuspecting world.
Added: branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/MANIFEST?rev=36055&op=file
==============================================================================
--- branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/MANIFEST (added)
+++ branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/MANIFEST Thu May 21 19:19:56 2009
@@ -1,0 +1,12 @@
+Build.PL
+Changes
+lib/MooseX/SemiAffordanceAccessor.pm
+lib/MooseX/SemiAffordanceAccessor/Role/Attribute.pm
+Makefile.PL
+MANIFEST This list of files
+META.yml
+README
+t/basic.t
+t/pod-coverage.t
+t/pod.t
+SIGNATURE Added here by Module::Build
Added: branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/META.yml?rev=36055&op=file
==============================================================================
--- branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/META.yml (added)
+++ branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/META.yml Thu May 21 19:19:56 2009
@@ -1,0 +1,23 @@
+---
+name: MooseX-SemiAffordanceAccessor
+version: 0.03
+author:
+ - 'Dave Rolsky, C<< <autarch at urth.org> >>'
+abstract: Name your accessors foo() and set_foo()
+license: perl
+resources:
+ license: http://dev.perl.org/licenses/
+requires:
+ Moose: 0.55_04
+build_requires:
+ Test::More: 0
+provides:
+ MooseX::SemiAffordanceAccessor:
+ file: lib/MooseX/SemiAffordanceAccessor.pm
+ version: 0.03
+ MooseX::SemiAffordanceAccessor::Role::Attribute:
+ file: lib/MooseX/SemiAffordanceAccessor/Role/Attribute.pm
+generated_by: Module::Build version 0.2808
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.2.html
+ version: 1.2
Added: branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/Makefile.PL?rev=36055&op=file
==============================================================================
--- branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/Makefile.PL (added)
+++ branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/Makefile.PL Thu May 21 19:19:56 2009
@@ -1,0 +1,31 @@
+# Note: this file was auto-generated by Module::Build::Compat version 0.03
+
+ unless (eval "use Module::Build::Compat 0.02; 1" ) {
+ print "This module requires Module::Build to install itself.\n";
+
+ require ExtUtils::MakeMaker;
+ my $yn = ExtUtils::MakeMaker::prompt
+ (' Install Module::Build now from CPAN?', 'y');
+
+ unless ($yn =~ /^y/i) {
+ die " *** Cannot install without Module::Build. Exiting ...\n";
+ }
+
+ require Cwd;
+ require File::Spec;
+ require CPAN;
+
+ # Save this 'cause CPAN will chdir all over the place.
+ my $cwd = Cwd::cwd();
+
+ CPAN::Shell->install('Module::Build::Compat');
+ CPAN::Shell->expand("Module", "Module::Build::Compat")->uptodate
+ or die "Couldn't install Module::Build, giving up.\n";
+
+ chdir $cwd or die "Cannot chdir() back to $cwd: $!";
+ }
+ eval "use Module::Build::Compat 0.02; 1" or die $@;
+
+ Module::Build::Compat->run_build_pl(args => \@ARGV);
+ require Module::Build;
+ Module::Build::Compat->write_makefile(build_class => 'Module::Build');
Added: branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/README?rev=36055&op=file
==============================================================================
--- branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/README (added)
+++ branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/README Thu May 21 19:19:56 2009
@@ -1,0 +1,39 @@
+NAME
+ MooseX::SemiAffordanceAccessor - Name your accessors foo() and set_foo()
+
+SYNOPSIS
+ use MooseX::SemiAffordanceAccessor;
+ use Moose;
+
+ # make some attributes
+
+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 have the same name
+ as the accessor, while set methods are prefixed with "set_".
+
+ If you define an attribute with a leading underscore, then the set
+ method will start with "_set_".
+
+ If you explicitly set a "reader" or "writer" name when creating an
+ attribute, then that attribute's naming scheme is left unchanged.
+
+ The name "semi-affordance" comes from David Wheeler's Class::Meta
+ module.
+
+AUTHOR
+ Dave Rolsky, "<autarch at urth.org>"
+
+BUGS
+ Please report any bugs or feature requests to
+ "bug-moosex-semiaffordanceaccessor at rt.cpan.org", or through the web
+ interface at <http://rt.cpan.org>. I will be notified, and then you'll
+ automatically be notified of progress on your bug as I make changes.
+
+COPYRIGHT & LICENSE
+ Copyright 2007-2008 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.
+
Added: branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/SIGNATURE?rev=36055&op=file
==============================================================================
--- branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/SIGNATURE (added)
+++ branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/SIGNATURE Thu May 21 19:19:56 2009
@@ -1,0 +1,34 @@
+This file contains message digests of all files listed in MANIFEST,
+signed via the Module::Signature module, version 0.55.
+
+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 78fc95c3d53b62fd626f0badcf814099bc72c73f Build.PL
+SHA1 5c27f1ceb729bf222ac99f7f16840e50735db21f Changes
+SHA1 62cc78a0dacd69ba1788ed81e17f98b1814dd076 MANIFEST
+SHA1 05c68f37ad0fdbd7dc5c15a92ff54c9d953d8a23 META.yml
+SHA1 cd14ada78fb37a0d926edd86eddcdf7f939de582 Makefile.PL
+SHA1 f84260ebc6b22dbf4b272741c34e4b9a7264d729 README
+SHA1 5507c702ba99de1eaa92af2fc139a00f68bb62c1 lib/MooseX/SemiAffordanceAccessor.pm
+SHA1 61d394f1a15bf2f1ae8ec3509756dd42364d4f0c lib/MooseX/SemiAffordanceAccessor/Role/Attribute.pm
+SHA1 f341573921f6e86b4cf227d1dfe75f75b469b8c4 t/basic.t
+SHA1 1e31329479c8a8c8d4c4de1382e89dc8c85ea68b t/pod-coverage.t
+SHA1 cec881e89926d320475f9de2b7fad02c2169f510 t/pod.t
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.6 (GNU/Linux)
+
+iD8DBQFIuho53Or3ZzQuifMRAor+AJ42ueoJTUxP7bjSjcCm4db0CvlIbACg4HBK
+YkUulzuXtoyBOVS7MSAXogI=
+=XUUS
+-----END PGP SIGNATURE-----
Added: branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/lib/MooseX/SemiAffordanceAccessor.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/lib/MooseX/SemiAffordanceAccessor.pm?rev=36055&op=file
==============================================================================
--- branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/lib/MooseX/SemiAffordanceAccessor.pm (added)
+++ branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/lib/MooseX/SemiAffordanceAccessor.pm Thu May 21 19:19:56 2009
@@ -1,0 +1,84 @@
+package MooseX::SemiAffordanceAccessor;
+
+use strict;
+use warnings;
+
+our $VERSION = '0.03';
+
+use Moose 0.5504 ();
+use Moose::Exporter;
+use Moose::Util::MetaRole;
+use MooseX::SemiAffordanceAccessor::Role::Attribute;
+
+# The main reason to use this is to ensure that we get the right value
+# in $p{for_class} later.
+Moose::Exporter->setup_import_methods();
+
+sub init_meta
+{
+ shift;
+ my %p = @_;
+
+ Moose->init_meta(%p);
+
+ return
+ Moose::Util::MetaRole::apply_metaclass_roles
+ ( for_class => $p{for_class},
+ attribute_metaclass_roles =>
+ ['MooseX::SemiAffordanceAccessor::Role::Attribute'],
+ );
+}
+
+1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+MooseX::SemiAffordanceAccessor - Name your accessors foo() and set_foo()
+
+=head1 SYNOPSIS
+
+ use MooseX::SemiAffordanceAccessor;
+ use Moose;
+
+ # 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 have the same name
+as the accessor, while set methods are prefixed with "set_".
+
+If you define an attribute with a leading underscore, then the set
+method will start with "_set_".
+
+If you explicitly set a "reader" or "writer" name when creating an
+attribute, then that attribute's naming scheme is left unchanged.
+
+The name "semi-affordance" comes from David Wheeler's Class::Meta
+module.
+
+=head1 AUTHOR
+
+Dave Rolsky, C<< <autarch at urth.org> >>
+
+=head1 BUGS
+
+Please report any bugs or feature requests to
+C<bug-moosex-semiaffordanceaccessor at rt.cpan.org>, or through
+the web interface at L<http://rt.cpan.org>. 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-2008 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
Added: branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/lib/MooseX/SemiAffordanceAccessor/Role/Attribute.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/lib/MooseX/SemiAffordanceAccessor/Role/Attribute.pm?rev=36055&op=file
==============================================================================
--- branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/lib/MooseX/SemiAffordanceAccessor/Role/Attribute.pm (added)
+++ branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/lib/MooseX/SemiAffordanceAccessor/Role/Attribute.pm Thu May 21 19:19:56 2009
@@ -1,0 +1,73 @@
+package MooseX::SemiAffordanceAccessor::Role::Attribute;
+
+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} ) )
+ {
+ if ( $options->{is} eq 'ro' )
+ {
+ $options->{reader} = $name;
+ }
+ elsif ( $options->{is} eq 'rw' )
+ {
+ $options->{reader} = $name;
+
+ my $prefix = 'set';
+ if ( $name =~ s/^_// )
+ {
+ $prefix = '_set';
+ }
+
+ $options->{writer} = $prefix . q{_} . $name;
+ }
+
+ delete $options->{is};
+ }
+};
+
+no Moose::Role;
+
+1;
+
+=head1 NAME
+
+MooseX::SemiAffordanceAccessor::Role::Attribute - Names accessors in a semi-affordance style
+
+=head1 SYNOPSIS
+
+ Moose::Util::MetaRole::apply_metaclass_roles
+ ( for_class => $p{for_class},
+ attribute_metaclass_roles =>
+ ['MooseX::SemiAffordanceAccessor::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 semi-affordance naming style.
+
+=head1 AUTHOR
+
+Dave Rolsky, C<< <autarch at urth.org> >>
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2007-2008 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
+
Added: branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/basic.t?rev=36055&op=file
==============================================================================
--- branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/basic.t (added)
+++ branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/basic.t Thu May 21 19:19:56 2009
@@ -1,0 +1,51 @@
+use strict;
+use warnings;
+
+use Test::More tests => 12;
+
+
+{
+ package Standard;
+
+ use Moose;
+
+ has 'thing' => ( is => 'rw' );
+ has '_private' => ( is => 'rw' );
+}
+
+{
+ package SAA;
+
+ use MooseX::SemiAffordanceAccessor;
+ use Moose;
+
+ has 'thing' => ( is => 'rw' );
+ has '_private' => ( is => 'rw' );
+}
+
+{
+ package SAA2;
+
+ # Make sure load order doesn't matter
+ use Moose;
+ use MooseX::SemiAffordanceAccessor;
+
+ has 'thing' => ( is => 'rw' );
+ has '_private' => ( is => 'rw' );
+}
+
+
+ok( Standard->can('thing'), 'Standard->thing() exists' );
+ok( ! Standard->can('set_thing'), 'Standard->set_thing() does not exist' );
+ok( Standard->can('_private'), 'Standard->_private() exists' );
+ok( ! Standard->can('_set_private'), 'Standard->_set_private() does not exist' );
+
+ok( SAA->can('thing'), 'SAA->thing() exists' );
+ok( SAA->can('set_thing'), 'SAA->set_thing() exists' );
+ok( SAA->can('_private'), 'SAA->_private() exists' );
+ok( SAA->can('_set_private'), 'SAA->_set_private() exists' );
+
+ok( SAA2->can('thing'), 'SAA2->thing() exists' );
+ok( SAA2->can('set_thing'), 'SAA2->set_thing() exists' );
+ok( SAA2->can('_private'), 'SAA2->_private() exists' );
+ok( SAA2->can('_set_private'), 'SAA2->_set_private() exists' );
Added: branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/pod-coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/pod-coverage.t?rev=36055&op=file
==============================================================================
--- branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/pod-coverage.t (added)
+++ branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/pod-coverage.t Thu May 21 19:19:56 2009
@@ -1,0 +1,14 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+
+plan skip_all => 'This test is only run for the module author'
+ unless -d '.svn' || $ENV{IS_MAINTAINER};
+
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage"
+ if $@;
+
+all_pod_coverage_ok( { trustme => [ qr/^init_meta$/ ] } );
Added: branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/pod.t?rev=36055&op=file
==============================================================================
--- branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/pod.t (added)
+++ branches/upstream/libmoosex-semiaffordanceaccessor-perl/current/t/pod.t Thu May 21 19:19:56 2009
@@ -1,0 +1,13 @@
+use strict;
+use warnings;
+
+use Test::More;
+
+
+plan skip_all => 'This test is only run for the module author'
+ unless -d '.svn' || $ENV{IS_MAINTAINER};
+
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+
+all_pod_files_ok();
More information about the Pkg-perl-cvs-commits
mailing list