r48790 - in /branches/upstream/libmoosex-getopt-perl/current: ./ lib/MooseX/ lib/MooseX/Getopt/ lib/MooseX/Getopt/Meta/ lib/MooseX/Getopt/Meta/Attribute/ lib/MooseX/Getopt/Meta/Attribute/Trait/ t/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Tue Dec 15 23:55:26 UTC 2009


Author: jawnsy-guest
Date: Tue Dec 15 23:55:17 2009
New Revision: 48790

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=48790
Log:
[svn-upgrade] Integrating new upstream version, libmoosex-getopt-perl (0.26)

Added:
    branches/upstream/libmoosex-getopt-perl/current/t/105_uc_bug_more.t
    branches/upstream/libmoosex-getopt-perl/current/t/106_no_ignore_case.t
Modified:
    branches/upstream/libmoosex-getopt-perl/current/ChangeLog
    branches/upstream/libmoosex-getopt-perl/current/MANIFEST
    branches/upstream/libmoosex-getopt-perl/current/META.yml
    branches/upstream/libmoosex-getopt-perl/current/README
    branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm
    branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Basic.pm
    branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute.pm
    branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm
    branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait.pm
    branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait/NoGetopt.pm
    branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/OptionTypeMap.pm

Modified: branches/upstream/libmoosex-getopt-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/ChangeLog?rev=48790&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/ChangeLog (original)
+++ branches/upstream/libmoosex-getopt-perl/current/ChangeLog Tue Dec 15 23:55:17 2009
@@ -1,4 +1,11 @@
 Revision history for Perl extension MooseX-Getopt
+
+0.26 Thu. Dec 10 2009
+  * MooseX::Getopt::Basic
+   - Fix bug with attribute names containing upper case letters.
+  * Test suite:
+    - Add t/106_no_ignore_case.t for testing the compatibility with
+      no_ignore_case
 
 0.25 Thu. Nov 26 2009
   * MooseX::Getopt

Modified: branches/upstream/libmoosex-getopt-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/MANIFEST?rev=48790&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/MANIFEST (original)
+++ branches/upstream/libmoosex-getopt-perl/current/MANIFEST Tue Dec 15 23:55:17 2009
@@ -40,5 +40,7 @@
 t/102_basic_basic.t
 t/103_uc_bug.t
 t/104_override_usage.t
+t/105_uc_bug_more.t
+t/106_no_ignore_case.t
 t/author/pod.t
 t/author/pod_coverage.t

Modified: branches/upstream/libmoosex-getopt-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/META.yml?rev=48790&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/META.yml (original)
+++ branches/upstream/libmoosex-getopt-perl/current/META.yml Tue Dec 15 23:55:17 2009
@@ -27,4 +27,4 @@
 resources:
   license: http://dev.perl.org/licenses/
   repository: git://git.moose.perl.org/MooseX-Getopt.git
-version: 0.25
+version: 0.26

Modified: branches/upstream/libmoosex-getopt-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/README?rev=48790&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/README (original)
+++ branches/upstream/libmoosex-getopt-perl/current/README Tue Dec 15 23:55:17 2009
@@ -1,4 +1,4 @@
-MooseX::Getopt version 0.25
+MooseX::Getopt version 0.26
 ===========================
 
 See the individual module documentation for more information

Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm?rev=48790&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm Tue Dec 15 23:55:17 2009
@@ -1,12 +1,12 @@
 package MooseX::Getopt;
 use Moose::Role;
 
-use constant HAVE_GLD => not not eval { require Getopt::Long::Descriptive };
-
-our $VERSION   = '0.25';
+use constant _HAVE_GLD => not not eval { require Getopt::Long::Descriptive };
+
+our $VERSION   = '0.26';
 our $AUTHORITY = 'cpan:STEVAN';
 
-with HAVE_GLD ? 'MooseX::Getopt::GLD' : 'MooseX::Getopt::Basic';
+with _HAVE_GLD ? 'MooseX::Getopt::GLD' : 'MooseX::Getopt::Basic';
 
 no Moose::Role; 1;
 

Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Basic.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Basic.pm?rev=48790&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Basic.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Basic.pm Tue Dec 15 23:55:17 2009
@@ -143,7 +143,7 @@
     foreach my $opt ( @{ $params{options} } ) {
         push @options, $opt->{opt_string};
 
-        my $identifier = lc($opt->{name});
+        my $identifier = $opt->{name};
         $identifier =~ s/\W/_/g; # Getopt::Long does this to all option names
 
         $name_to_init_arg{$identifier} = $opt->{init_arg};

Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute.pm?rev=48790&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute.pm Tue Dec 15 23:55:17 2009
@@ -3,7 +3,7 @@
 use Moose;
 use Moose::Util::TypeConstraints;
 
-our $VERSION   = '0.25';
+our $VERSION   = '0.26';
 our $AUTHORITY = 'cpan:STEVAN';
 
 extends 'Moose::Meta::Attribute'; # << Moose extending Moose :)

Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm?rev=48790&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm Tue Dec 15 23:55:17 2009
@@ -2,7 +2,7 @@
 package MooseX::Getopt::Meta::Attribute::NoGetopt;
 use Moose;
 
-our $VERSION   = '0.25';
+our $VERSION   = '0.26';
 our $AUTHORITY = 'cpan:STEVAN';
 
 extends 'Moose::Meta::Attribute'; # << Moose extending Moose :)

Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait.pm?rev=48790&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait.pm Tue Dec 15 23:55:17 2009
@@ -3,7 +3,7 @@
 use Moose::Role;
 use Moose::Util::TypeConstraints;
 
-our $VERSION   = '0.25';
+our $VERSION   = '0.26';
 our $AUTHORITY = 'cpan:STEVAN';
 
 has 'cmd_flag' => (

Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait/NoGetopt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait/NoGetopt.pm?rev=48790&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait/NoGetopt.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Meta/Attribute/Trait/NoGetopt.pm Tue Dec 15 23:55:17 2009
@@ -2,7 +2,7 @@
 package MooseX::Getopt::Meta::Attribute::Trait::NoGetopt;
 use Moose::Role;
 
-our $VERSION   = '0.25';
+our $VERSION   = '0.26';
 our $AUTHORITY = 'cpan:STEVAN';
 
 no Moose::Role;

Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/OptionTypeMap.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/OptionTypeMap.pm?rev=48790&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/OptionTypeMap.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/OptionTypeMap.pm Tue Dec 15 23:55:17 2009
@@ -4,7 +4,7 @@
 use Moose 'confess', 'blessed';
 use Moose::Util::TypeConstraints 'find_type_constraint';
 
-our $VERSION   = '0.25';
+our $VERSION   = '0.26';
 our $AUTHORITY = 'cpan:STEVAN';
 
 my %option_type_map = (

Added: branches/upstream/libmoosex-getopt-perl/current/t/105_uc_bug_more.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/t/105_uc_bug_more.t?rev=48790&op=file
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/t/105_uc_bug_more.t (added)
+++ branches/upstream/libmoosex-getopt-perl/current/t/105_uc_bug_more.t Tue Dec 15 23:55:17 2009
@@ -1,0 +1,37 @@
+use strict;
+use warnings;
+use Test::More;
+use Moose ();
+use Moose::Meta::Class;
+
+foreach my $role (qw/
+    MooseX::Getopt
+    MooseX::Getopt::GLD
+    MooseX::Getopt::Basic
+/) {
+    Class::MOP::load_class($role);
+
+    my $meta = Moose::Meta::Class->create_anon_class(
+        superclasses => ['Moose::Object'],
+    );
+    $meta->add_attribute('Debug', traits => ['Getopt'], isa => 'Bool',
+        cmd_aliases => ['d'], is => 'ro');
+    $role->meta->apply($meta);
+
+    ok($meta->name->new_with_options({ argv => ['-d'] })->Debug,
+        "Debug was set for argv -d on $role");
+    {
+        local @ARGV = ('-d');
+        ok($meta->name->new_with_options()->Debug,
+            "Debug was set for ARGV on $role");
+    }
+
+    ok($meta->name->new_with_options({ argv => ['--Debug'] })->Debug,
+        "Debug was set for argv --Debug on $role");
+
+    ok($meta->name->new_with_options({ argv => ['--debug'] })->Debug,
+        "Debug was set for argv --debug on $role");
+}
+
+done_testing;
+

Added: branches/upstream/libmoosex-getopt-perl/current/t/106_no_ignore_case.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/t/106_no_ignore_case.t?rev=48790&op=file
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/t/106_no_ignore_case.t (added)
+++ branches/upstream/libmoosex-getopt-perl/current/t/106_no_ignore_case.t Tue Dec 15 23:55:17 2009
@@ -1,0 +1,57 @@
+use strict;
+use warnings;
+use Test::More;
+use Moose ();
+use Moose::Meta::Class;
+
+foreach my $role (qw/
+    MooseX::Getopt
+    MooseX::Getopt::GLD
+    MooseX::Getopt::Basic
+/) {
+    Class::MOP::load_class($role);
+
+    my $meta = Moose::Meta::Class->create_anon_class(
+        superclasses => ['Moose::Object'],
+    );
+    $meta->add_attribute('BigD', traits => ['Getopt'], isa => 'Bool',
+        cmd_aliases => ['D'], is => 'ro');
+    $meta->add_attribute('SmallD', traits => ['Getopt'], isa => 'Bool',
+        cmd_aliases => ['d'], is => 'ro');    
+    $role->meta->apply($meta);
+
+    {
+        my $obj = $meta->name->new_with_options(
+                { argv => ["-d"], no_ignore_case => 1}
+            );
+
+        ok((! $obj->BigD), "BigD was not set for argv -d on $role");
+        ok($obj->SmallD, "SmallD was set for argv -d on $role");
+
+    }
+    ok($meta->name->new_with_options({ argv => ['-d'], no_ignore_case => 1})
+            ->SmallD,
+        "SmallD was set for argv -d on $role");
+    {
+        local @ARGV = ('-d');
+        ok($meta->name->new_with_options()->SmallD,
+            "SmallD was set for ARGV on $role");
+    }
+
+    ok($meta->name->new_with_options({ argv => ['-D'], no_ignore_case => 1})
+            ->BigD,
+        "BigD was set for argv -d on $role");
+
+    {
+        my $obj = $meta->name->new_with_options(
+                { argv => ['-D', "-d"], no_ignore_case => 1}
+            );
+
+        ok($obj->BigD, "BigD was set for argv -D -d on $role");
+        ok($obj->SmallD, "SmallD was set for argv -D -d on $role");
+
+    }
+}
+
+done_testing;
+




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