r69878 - in /branches/upstream/libmoosex-strictconstructor-perl/current: ./ lib/MooseX/ lib/MooseX/StrictConstructor/Role/ lib/MooseX/StrictConstructor/Role/Meta/ lib/MooseX/StrictConstructor/Trait/ lib/MooseX/StrictConstructor/Trait/Method/ t/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Sun Feb 27 15:33:06 UTC 2011


Author: jawnsy-guest
Date: Sun Feb 27 15:32:53 2011
New Revision: 69878

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=69878
Log:
[svn-upgrade] new version libmoosex-strictconstructor-perl (0.13)

Added:
    branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Trait/
    branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Trait/Class.pm
    branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Trait/Method/
    branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Trait/Method/Constructor.pm
Removed:
    branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Role/Meta/
    branches/upstream/libmoosex-strictconstructor-perl/current/t/release-kwalitee.t
Modified:
    branches/upstream/libmoosex-strictconstructor-perl/current/Changes
    branches/upstream/libmoosex-strictconstructor-perl/current/LICENSE
    branches/upstream/libmoosex-strictconstructor-perl/current/MANIFEST
    branches/upstream/libmoosex-strictconstructor-perl/current/META.json
    branches/upstream/libmoosex-strictconstructor-perl/current/META.yml
    branches/upstream/libmoosex-strictconstructor-perl/current/Makefile.PL
    branches/upstream/libmoosex-strictconstructor-perl/current/README
    branches/upstream/libmoosex-strictconstructor-perl/current/SIGNATURE
    branches/upstream/libmoosex-strictconstructor-perl/current/dist.ini
    branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor.pm
    branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Role/Object.pm

Modified: branches/upstream/libmoosex-strictconstructor-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-strictconstructor-perl/current/Changes?rev=69878&op=diff
==============================================================================
--- branches/upstream/libmoosex-strictconstructor-perl/current/Changes (original)
+++ branches/upstream/libmoosex-strictconstructor-perl/current/Changes Sun Feb 27 15:32:53 2011
@@ -1,3 +1,9 @@
+0.13     2011-02-22
+
+- This release provides forward compatibility with Moose 1.99+. It will still
+  work with Moose 1.23 as well. Most of the work was done by Jesse Luehrs.
+
+
 0.12     2010-10-29
 
 - Switched tests to use Test::Fatal instead of Test::Exception.

Modified: branches/upstream/libmoosex-strictconstructor-perl/current/LICENSE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-strictconstructor-perl/current/LICENSE?rev=69878&op=diff
==============================================================================
--- branches/upstream/libmoosex-strictconstructor-perl/current/LICENSE (original)
+++ branches/upstream/libmoosex-strictconstructor-perl/current/LICENSE Sun Feb 27 15:32:53 2011
@@ -2,7 +2,7 @@
 
 This is free software, licensed under:
 
-  The Artistic License 2.0
+  The Artistic License 2.0 (GPL Compatible)
 
 		       The Artistic License 2.0
 

Modified: branches/upstream/libmoosex-strictconstructor-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-strictconstructor-perl/current/MANIFEST?rev=69878&op=diff
==============================================================================
--- branches/upstream/libmoosex-strictconstructor-perl/current/MANIFEST (original)
+++ branches/upstream/libmoosex-strictconstructor-perl/current/MANIFEST Sun Feb 27 15:32:53 2011
@@ -9,12 +9,12 @@
 SIGNATURE
 dist.ini
 lib/MooseX/StrictConstructor.pm
-lib/MooseX/StrictConstructor/Role/Meta/Method/Constructor.pm
 lib/MooseX/StrictConstructor/Role/Object.pm
+lib/MooseX/StrictConstructor/Trait/Class.pm
+lib/MooseX/StrictConstructor/Trait/Method/Constructor.pm
 t/basic.t
 t/instance.t
 t/release-eol.t
-t/release-kwalitee.t
 t/release-no-tabs.t
 t/release-pod-coverage.t
 t/release-pod-spell.t

Modified: branches/upstream/libmoosex-strictconstructor-perl/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-strictconstructor-perl/current/META.json?rev=69878&op=diff
==============================================================================
--- branches/upstream/libmoosex-strictconstructor-perl/current/META.json (original)
+++ branches/upstream/libmoosex-strictconstructor-perl/current/META.json Sun Feb 27 15:32:53 2011
@@ -4,7 +4,7 @@
       "Dave Rolsky <autarch at urth.org>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 4.102342, CPAN::Meta::Converter version 2.101670",
+   "generated_by" : "Dist::Zilla version 4.200004, CPAN::Meta::Converter version 2.110240",
    "license" : [
       "artistic_2"
    ],
@@ -21,7 +21,8 @@
       },
       "runtime" : {
          "requires" : {
-            "Moose" : "0.94"
+            "Moose" : "0.94",
+            "namespace::autoclean" : 0
          }
       },
       "test" : {
@@ -43,6 +44,6 @@
          "web" : "http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo/MooseX-StrictConstructor.git;a=summary"
       }
    },
-   "version" : "0.12"
+   "version" : "0.13"
 }
 

Modified: branches/upstream/libmoosex-strictconstructor-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-strictconstructor-perl/current/META.yml?rev=69878&op=diff
==============================================================================
--- branches/upstream/libmoosex-strictconstructor-perl/current/META.yml (original)
+++ branches/upstream/libmoosex-strictconstructor-perl/current/META.yml Sun Feb 27 15:32:53 2011
@@ -8,7 +8,7 @@
 configure_requires:
   ExtUtils::MakeMaker: 6.31
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.102342, CPAN::Meta::Converter version 2.101670'
+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
@@ -16,7 +16,8 @@
 name: MooseX-StrictConstructor
 requires:
   Moose: 0.94
+  namespace::autoclean: 0
 resources:
   bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooseX-StrictConstructor
   repository: git://git.moose.perl.org/MooseX-StrictConstructor.git
-version: 0.12
+version: 0.13

Modified: branches/upstream/libmoosex-strictconstructor-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-strictconstructor-perl/current/Makefile.PL?rev=69878&op=diff
==============================================================================
--- branches/upstream/libmoosex-strictconstructor-perl/current/Makefile.PL (original)
+++ branches/upstream/libmoosex-strictconstructor-perl/current/Makefile.PL Sun Feb 27 15:32:53 2011
@@ -23,9 +23,10 @@
   'LICENSE' => 'artistic_2',
   'NAME' => 'MooseX::StrictConstructor',
   'PREREQ_PM' => {
-    'Moose' => '0.94'
+    'Moose' => '0.94',
+    'namespace::autoclean' => '0'
   },
-  'VERSION' => '0.12',
+  'VERSION' => '0.13',
   'test' => {
     'TESTS' => 't/*.t'
   }

Modified: branches/upstream/libmoosex-strictconstructor-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-strictconstructor-perl/current/README?rev=69878&op=diff
==============================================================================
--- branches/upstream/libmoosex-strictconstructor-perl/current/README (original)
+++ branches/upstream/libmoosex-strictconstructor-perl/current/README Sun Feb 27 15:32:53 2011
@@ -1,7 +1,7 @@
 
 
 This archive contains the distribution MooseX-StrictConstructor,
-version 0.12:
+version 0.13:
 
   Make your object constructors blow up on unknown attributes
 
@@ -9,6 +9,6 @@
 
 This is free software, licensed under:
 
-  The Artistic License 2.0
+  The Artistic License 2.0 (GPL Compatible)
 
 

Modified: branches/upstream/libmoosex-strictconstructor-perl/current/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-strictconstructor-perl/current/SIGNATURE?rev=69878&op=diff
==============================================================================
--- branches/upstream/libmoosex-strictconstructor-perl/current/SIGNATURE (original)
+++ branches/upstream/libmoosex-strictconstructor-perl/current/SIGNATURE Sun Feb 27 15:32:53 2011
@@ -1,5 +1,5 @@
 This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.61.
+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:
@@ -14,22 +14,22 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 052e7dacb57afb15f5f49618b65ddcfa89444d59 Changes
+SHA1 099ab128447adaa7b9a0b34be3c08ae8d6d30349 Changes
 SHA1 b09c48494e1d0630c6bd6b11fef8e0ac35d509da INSTALL
-SHA1 23c628b4a8a36738405ccdacaeb912d2e727b4c0 LICENSE
-SHA1 933db8871a9243326a000bda311e4feeb78b270d MANIFEST
-SHA1 427aca6952d2fef5e3f08b3fb56bd6cc1f802ea0 META.json
-SHA1 c695968184bd77bda69d09349a97c75414713591 META.yml
-SHA1 b068ab03bf363d382f1d35862c5d152dba50fdfc Makefile.PL
-SHA1 5aff9f7ae827474df4061d80cd9c3489ea2f19f4 README
-SHA1 7d542ad22a244ac2abe10630f6caa515ab65075e dist.ini
-SHA1 9fa15560aeb4a429580bfd052cf353a0a8f7a947 lib/MooseX/StrictConstructor.pm
-SHA1 bdc997a957e260afcc552fc5bf364fbd162e1b4e lib/MooseX/StrictConstructor/Role/Meta/Method/Constructor.pm
-SHA1 5651cbe13e1d39d8ef1458824ba748dfd65f23ec lib/MooseX/StrictConstructor/Role/Object.pm
+SHA1 eb84232fee945db1334ac42224747143e99285ac LICENSE
+SHA1 b815cf8e0fa77a4b2a15e01518282ffbd68fd145 MANIFEST
+SHA1 dfafa4714a9a54ec236fe6e4aee0eb72fd648fdf META.json
+SHA1 c9e4931544d6fd0aa3c75cdc41d5e64704c0f6ac META.yml
+SHA1 07799668a9914b3e38dea1cc9eeaa1b80ebd24ea Makefile.PL
+SHA1 b93f06b8b80ef3a463afbff60f76c0cfdb1c8373 README
+SHA1 f6cd7eae7b7cb10e24ec9dafacc144473ea77330 dist.ini
+SHA1 ab7011339f74b185d49e659742ce022bce9e08cb lib/MooseX/StrictConstructor.pm
+SHA1 f4c98a08202a2da2c3d3b9414d013cd538fadab8 lib/MooseX/StrictConstructor/Role/Object.pm
+SHA1 f5c6cdcf64bb7181208aab9a9f30da42335229fd lib/MooseX/StrictConstructor/Trait/Class.pm
+SHA1 bc37a9cf21a4e7f2a327445c091be7e183f7b233 lib/MooseX/StrictConstructor/Trait/Method/Constructor.pm
 SHA1 25b48e3b97bb0b262c614332a95dea56e5a71aa9 t/basic.t
 SHA1 08967270a332012eb2b6930bc44768d07e7cb8fa t/instance.t
 SHA1 a032c41ef6887fab1b900669c2d304fab46680e2 t/release-eol.t
-SHA1 961a1e2c92d836c8cad2d34b784cbc75345dec63 t/release-kwalitee.t
 SHA1 455d1dd1867212a665ad5ea4126b572411de300c t/release-no-tabs.t
 SHA1 9433c240fe590bc404ab68ff63984df763e347ed t/release-pod-coverage.t
 SHA1 48e2a1a1f3252d687ed5d54cb68109fb1466de7d t/release-pod-spell.t
@@ -37,7 +37,7 @@
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
-iEYEARECAAYFAkzK5lQACgkQIgMCsV8qvRIWdgCfZMnusBi1e5wmce/vVEjBXLw+
-WlwAnA/+9BPRjxQkd8cFcTKM9obKQjKR
-=vk5G
+iEYEARECAAYFAk1khFEACgkQIgMCsV8qvRKvvACffTh26nduj6x3Z9djEYdvPx84
+rmsAn1USl273aFiybPdzq4epGvYyE2yK
+=56Q5
 -----END PGP SIGNATURE-----

Modified: branches/upstream/libmoosex-strictconstructor-perl/current/dist.ini
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-strictconstructor-perl/current/dist.ini?rev=69878&op=diff
==============================================================================
--- branches/upstream/libmoosex-strictconstructor-perl/current/dist.ini (original)
+++ branches/upstream/libmoosex-strictconstructor-perl/current/dist.ini Sun Feb 27 15:32:53 2011
@@ -1,8 +1,10 @@
 name = MooseX-StrictConstructor
 author  = Dave Rolsky <autarch at urth.org>
-copyright_year = 2010
+license = Artistic_2_0
+copyright_holder = Dave Rolsky
+copyright_year   = 2010
 
-version = 0.12
+version = 0.13
 
 [@Basic]
 
@@ -20,7 +22,6 @@
 
 [PkgVersion]
 
-[KwaliteeTests]
 [PodTests]
 [NoTabsTests]
 [EOLTests]
@@ -30,6 +31,7 @@
 
 [Prereqs]
 Moose = 0.94
+namespace::autoclean = 0
 
 [Prereqs / TestRequires]
 Test::Fatal = 0

Modified: branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor.pm?rev=69878&op=diff
==============================================================================
--- branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor.pm (original)
+++ branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor.pm Sun Feb 27 15:32:53 2011
@@ -1,6 +1,6 @@
 package MooseX::StrictConstructor;
 BEGIN {
-  $MooseX::StrictConstructor::VERSION = '0.12';
+  $MooseX::StrictConstructor::VERSION = '0.13';
 }
 
 use strict;
@@ -10,15 +10,28 @@
 use Moose::Exporter;
 use Moose::Util::MetaRole;
 use MooseX::StrictConstructor::Role::Object;
-use MooseX::StrictConstructor::Role::Meta::Method::Constructor;
 
-Moose::Exporter->setup_import_methods(
-    class_metaroles => {
-        constructor =>
-            ['MooseX::StrictConstructor::Role::Meta::Method::Constructor']
-    },
-    base_class_roles => ['MooseX::StrictConstructor::Role::Object'],
-);
+{
+    my %class_meta;
+
+    if ( $Moose::VERSION < 1.9900 ) {
+        require MooseX::StrictConstructor::Trait::Method::Constructor;
+        %class_meta = (
+            constructor => [
+                'MooseX::StrictConstructor::Trait::Method::Constructor']
+        );
+    }
+    else {
+        require MooseX::StrictConstructor::Trait::Class;
+        %class_meta
+            = ( class => ['MooseX::StrictConstructor::Trait::Class'] );
+    }
+
+    Moose::Exporter->setup_import_methods(
+            class_metaroles  => \%class_meta,
+            base_class_roles => ['MooseX::StrictConstructor::Role::Object'],
+    );
+}
 
 1;
 
@@ -34,7 +47,7 @@
 
 =head1 VERSION
 
-version 0.12
+version 0.13
 
 =head1 SYNOPSIS
 
@@ -95,7 +108,7 @@
 
 This is free software, licensed under:
 
-  The Artistic License 2.0
+  The Artistic License 2.0 (GPL Compatible)
 
 =cut
 

Modified: branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Role/Object.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Role/Object.pm?rev=69878&op=diff
==============================================================================
--- branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Role/Object.pm (original)
+++ branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Role/Object.pm Sun Feb 27 15:32:53 2011
@@ -1,12 +1,11 @@
 package MooseX::StrictConstructor::Role::Object;
 BEGIN {
-  $MooseX::StrictConstructor::Role::Object::VERSION = '0.12';
+  $MooseX::StrictConstructor::Role::Object::VERSION = '0.13';
 }
 
-use strict;
-use warnings;
+use Moose::Role;
 
-use Moose::Role;
+use namespace::autoclean;
 
 after 'BUILDALL' => sub {
     my $self   = shift;
@@ -29,8 +28,6 @@
     return;
 };
 
-no Moose::Role;
-
 1;
 
 # ABSTRACT: A role which implements a strict constructor for Moose::Object
@@ -45,7 +42,7 @@
 
 =head1 VERSION
 
-version 0.12
+version 0.13
 
 =head1 SYNOPSIS
 
@@ -72,7 +69,7 @@
 
 This is free software, licensed under:
 
-  The Artistic License 2.0
+  The Artistic License 2.0 (GPL Compatible)
 
 =cut
 

Added: branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Trait/Class.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Trait/Class.pm?rev=69878&op=file
==============================================================================
--- branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Trait/Class.pm (added)
+++ branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Trait/Class.pm Sun Feb 27 15:32:53 2011
@@ -1,0 +1,74 @@
+package MooseX::StrictConstructor::Trait::Class;
+BEGIN {
+  $MooseX::StrictConstructor::Trait::Class::VERSION = '0.13';
+}
+
+use Moose::Role;
+
+use namespace::autoclean;
+
+use B ();
+use Carp ();
+
+around '_inline_BUILDALL' => sub {
+    my $orig = shift;
+    my $self = shift;
+
+    my @source = $self->$orig();
+
+    my @attrs = (
+        '__INSTANCE__ => 1,',
+        map { B::perlstring($_) . ' => 1,' }
+        grep {defined}
+        map  { $_->init_arg() } $self->get_all_attributes()
+    );
+
+    return (
+        @source,
+        'my %attrs = (' . ( join ' ', @attrs ) . ');',
+        'my @bad = sort grep { !$attrs{$_} } keys %{ $params };',
+        'if (@bad) {',
+            'Carp::confess "Found unknown attribute(s) passed to the constructor: @bad";',
+        '}',
+    );
+};
+
+1;
+
+# ABSTRACT: A role to make immutable constructors strict
+
+
+
+=pod
+
+=head1 NAME
+
+MooseX::StrictConstructor::Trait::Class - A role to make immutable constructors strict
+
+=head1 VERSION
+
+version 0.13
+
+=head1 DESCRIPTION
+
+This role simply wraps C<_inline_BUILDALL()> (from
+C<Moose::Meta::Class>) so that immutable classes have a
+strict constructor.
+
+=head1 AUTHOR
+
+Dave Rolsky <autarch at urth.org>
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2010 by Dave Rolsky.
+
+This is free software, licensed under:
+
+  The Artistic License 2.0 (GPL Compatible)
+
+=cut
+
+
+__END__
+

Added: branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Trait/Method/Constructor.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Trait/Method/Constructor.pm?rev=69878&op=file
==============================================================================
--- branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Trait/Method/Constructor.pm (added)
+++ branches/upstream/libmoosex-strictconstructor-perl/current/lib/MooseX/StrictConstructor/Trait/Method/Constructor.pm Sun Feb 27 15:32:53 2011
@@ -1,0 +1,79 @@
+package MooseX::StrictConstructor::Trait::Method::Constructor;
+BEGIN {
+  $MooseX::StrictConstructor::Trait::Method::Constructor::VERSION = '0.13';
+}
+
+use Moose::Role;
+
+use namespace::autoclean;
+
+use B ();
+use Carp ();
+
+around '_generate_BUILDALL' => sub {
+    my $orig = shift;
+    my $self = shift;
+
+    my $source = $self->$orig();
+    $source .= ";\n" if $source;
+
+    my @attrs = (
+        '__INSTANCE__ => 1,',
+        map { B::perlstring($_) . ' => 1,' }
+        grep {defined}
+        map  { $_->init_arg() } @{ $self->_attributes() }
+    );
+
+    $source .= <<"EOF";
+my \%attrs = (@attrs);
+
+my \@bad = sort grep { ! \$attrs{\$_} }  keys \%{ \$params };
+
+if (\@bad) {
+    Carp::confess "Found unknown attribute(s) passed to the constructor: \@bad";
+}
+EOF
+
+    return $source;
+};
+
+1;
+
+# ABSTRACT: A role to make immutable constructors strict
+
+
+
+=pod
+
+=head1 NAME
+
+MooseX::StrictConstructor::Trait::Method::Constructor - A role to make immutable constructors strict
+
+=head1 VERSION
+
+version 0.13
+
+=head1 DESCRIPTION
+
+This role simply wraps C<_generate_BUILDALL()> (from
+C<Moose::Meta::Method::Constructor>) so that immutable classes have a
+strict constructor.
+
+=head1 AUTHOR
+
+Dave Rolsky <autarch at urth.org>
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2010 by Dave Rolsky.
+
+This is free software, licensed under:
+
+  The Artistic License 2.0 (GPL Compatible)
+
+=cut
+
+
+__END__
+
+




More information about the Pkg-perl-cvs-commits mailing list