r72956 - 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/

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Thu Apr 21 16:48:45 UTC 2011


Author: gregoa
Date: Thu Apr 21 16:48:30 2011
New Revision: 72956

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

Added:
    branches/upstream/libmoosex-getopt-perl/current/t/111_gld_pass_through.t
Modified:
    branches/upstream/libmoosex-getopt-perl/current/ChangeLog
    branches/upstream/libmoosex-getopt-perl/current/MANIFEST
    branches/upstream/libmoosex-getopt-perl/current/META.json
    branches/upstream/libmoosex-getopt-perl/current/META.yml
    branches/upstream/libmoosex-getopt-perl/current/Makefile.PL
    branches/upstream/libmoosex-getopt-perl/current/README
    branches/upstream/libmoosex-getopt-perl/current/dist.ini
    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/Dashes.pm
    branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/GLD.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
    branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/ProcessedArgv.pm
    branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Strict.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=72956&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/ChangeLog (original)
+++ branches/upstream/libmoosex-getopt-perl/current/ChangeLog Thu Apr 21 16:48:30 2011
@@ -1,4 +1,13 @@
 Revision history for Perl extension MooseX-Getopt
+
+0.37 Wed 30 Mar 2011
+  * Fix missing dependency. (RT#67077)
+
+0.36 Tue 29 Mar 2011
+  * Fix dist.ini 'Prereq' into 'Prereqs' (Damien Krotkine)
+  * MooseX::Getopt::GLD
+    - change it to a MooseX::Role::Parameterized, so that it accepts
+      'getopt_conf' parameter (Damien Krotkine)
 
 0.35 Wed 09 Feb 2011
   * Fix missed change from Test::Exception to Test::Fatal

Modified: branches/upstream/libmoosex-getopt-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/MANIFEST?rev=72956&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/MANIFEST (original)
+++ branches/upstream/libmoosex-getopt-perl/current/MANIFEST Thu Apr 21 16:48:30 2011
@@ -41,6 +41,7 @@
 t/108_usage_attr.t
 t/109_help_flag.t
 t/110_sort_usage_by_attr_order.t
+t/111_gld_pass_through.t
 t/release-eol.t
 t/release-no-tabs.t
 t/release-pod-coverage.t

Modified: branches/upstream/libmoosex-getopt-perl/current/META.json
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/META.json?rev=72956&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/META.json (original)
+++ branches/upstream/libmoosex-getopt-perl/current/META.json Thu Apr 21 16:48:30 2011
@@ -34,7 +34,8 @@
          "requires" : {
             "Getopt::Long" : "2.37",
             "Getopt::Long::Descriptive" : "0.081",
-            "Moose" : "0.56"
+            "Moose" : "0.56",
+            "MooseX::Role::Parameterized" : 0
          }
       },
       "test" : {
@@ -59,7 +60,7 @@
          "web" : "http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo/MooseX-Getopt.git;a=summary"
       }
    },
-   "version" : "0.35",
+   "version" : "0.37",
    "x_Dist_Zilla" : {
       "plugins" : [
          {
@@ -183,18 +184,18 @@
             "version" : "3.101640"
          },
          {
-            "class" : "Dist::Zilla::Plugin::Prereq",
+            "class" : "Dist::Zilla::Plugin::Prereqs",
             "config" : {
                "Dist::Zilla::Plugin::Prereqs" : {
                   "phase" : "runtime",
                   "type" : "requires"
                }
             },
-            "name" : "Prereq",
-            "version" : "4.200001"
-         },
-         {
-            "class" : "Dist::Zilla::Plugin::Prereq",
+            "name" : "Prereqs",
+            "version" : "4.200001"
+         },
+         {
+            "class" : "Dist::Zilla::Plugin::Prereqs",
             "config" : {
                "Dist::Zilla::Plugin::Prereqs" : {
                   "phase" : "test",

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=72956&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/META.yml (original)
+++ branches/upstream/libmoosex-getopt-perl/current/META.yml Thu Apr 21 16:48:30 2011
@@ -31,11 +31,12 @@
   Getopt::Long: 2.37
   Getopt::Long::Descriptive: 0.081
   Moose: 0.56
+  MooseX::Role::Parameterized: 0
 resources:
   bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=MooseX-Getopt
   homepage: http://search.cpan.org/dist/MooseX-Getopt
   repository: git://git.moose.perl.org/MooseX-Getopt.git
-version: 0.35
+version: 0.37
 x_Dist_Zilla:
   plugins:
     -
@@ -135,15 +136,15 @@
       name: '@FLORA/PodWeaver'
       version: 3.101640
     -
-      class: Dist::Zilla::Plugin::Prereq
+      class: Dist::Zilla::Plugin::Prereqs
       config:
         Dist::Zilla::Plugin::Prereqs:
           phase: runtime
           type: requires
-      name: Prereq
+      name: Prereqs
       version: 4.200001
     -
-      class: Dist::Zilla::Plugin::Prereq
+      class: Dist::Zilla::Plugin::Prereqs
       config:
         Dist::Zilla::Plugin::Prereqs:
           phase: test

Modified: branches/upstream/libmoosex-getopt-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/Makefile.PL?rev=72956&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/Makefile.PL (original)
+++ branches/upstream/libmoosex-getopt-perl/current/Makefile.PL Thu Apr 21 16:48:30 2011
@@ -27,9 +27,10 @@
   'PREREQ_PM' => {
     'Getopt::Long' => '2.37',
     'Getopt::Long::Descriptive' => '0.081',
-    'Moose' => '0.56'
+    'Moose' => '0.56',
+    'MooseX::Role::Parameterized' => '0'
   },
-  'VERSION' => '0.35',
+  'VERSION' => '0.37',
   'test' => {
     'TESTS' => 't/*.t'
   }

Modified: branches/upstream/libmoosex-getopt-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/README?rev=72956&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/README (original)
+++ branches/upstream/libmoosex-getopt-perl/current/README Thu Apr 21 16:48:30 2011
@@ -1,7 +1,7 @@
 
 
 This archive contains the distribution MooseX-Getopt,
-version 0.35:
+version 0.37:
 
   A Moose role for processing command line options
 

Modified: branches/upstream/libmoosex-getopt-perl/current/dist.ini
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/dist.ini?rev=72956&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/dist.ini (original)
+++ branches/upstream/libmoosex-getopt-perl/current/dist.ini Thu Apr 21 16:48:30 2011
@@ -1,5 +1,5 @@
 name = MooseX-Getopt
-version = 0.35
+version = 0.37
 author = Stevan Little <stevan at iinteractive.com>
 author = Brandon L. Black <blblack at gmail.com>
 author = Yuval Kogman <nothingmuch at woobling.org>
@@ -21,12 +21,13 @@
 authority = cpan:STEVAN
 auto_prereq = 0
 
-[Prereq]
+[Prereqs]
 Getopt::Long = 2.37
 Getopt::Long::Descriptive = 0.081
 Moose = 0.56
+MooseX::Role::Parameterized = 0
 
-[Prereq / TestRequires]
+[Prereqs / TestRequires]
 Test::Fatal = 0.003
 Test::Warn = 0.21
 Test::More = 0.88

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=72956&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm Thu Apr 21 16:48:30 2011
@@ -3,7 +3,7 @@
   $MooseX::Getopt::AUTHORITY = 'cpan:STEVAN';
 }
 BEGIN {
-  $MooseX::Getopt::VERSION = '0.35';
+  $MooseX::Getopt::VERSION = '0.37';
 }
 # ABSTRACT: A Moose role for processing command line options
 

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=72956&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 Thu Apr 21 16:48:30 2011
@@ -3,7 +3,7 @@
   $MooseX::Getopt::Basic::AUTHORITY = 'cpan:STEVAN';
 }
 BEGIN {
-  $MooseX::Getopt::Basic::VERSION = '0.35';
+  $MooseX::Getopt::Basic::VERSION = '0.37';
 }
 # ABSTRACT: MooseX::Getopt::Basic - role to implement the Getopt::Long functionality
 

Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Dashes.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Dashes.pm?rev=72956&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Dashes.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Dashes.pm Thu Apr 21 16:48:30 2011
@@ -3,7 +3,7 @@
   $MooseX::Getopt::Dashes::AUTHORITY = 'cpan:STEVAN';
 }
 BEGIN {
-  $MooseX::Getopt::Dashes::VERSION = '0.35';
+  $MooseX::Getopt::Dashes::VERSION = '0.37';
 }
 # ABSTRACT: convert underscores in attribute names to dashes
 

Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/GLD.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/GLD.pm?rev=72956&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/GLD.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/GLD.pm Thu Apr 21 16:48:30 2011
@@ -3,74 +3,88 @@
   $MooseX::Getopt::GLD::AUTHORITY = 'cpan:STEVAN';
 }
 BEGIN {
-  $MooseX::Getopt::GLD::VERSION = '0.35';
+  $MooseX::Getopt::GLD::VERSION = '0.37';
 }
 # ABSTRACT: A Moose role for processing command line options with Getopt::Long::Descriptive
 
-use Moose::Role;
+use MooseX::Role::Parameterized;
 
 use Getopt::Long::Descriptive 0.081;
 
 with 'MooseX::Getopt::Basic';
 
-has usage => (
-    is => 'rw', isa => 'Getopt::Long::Descriptive::Usage',
-    traits => ['NoGetopt'],
+parameter getopt_conf => (
+    isa => 'ArrayRef[Str]',
+    default => sub { [] },
 );
 
-# captures the options: --help --usage --?
-has help_flag => (
-    is => 'ro', isa => 'Bool',
-    traits => ['Getopt'],
-    cmd_flag => 'help',
-    cmd_aliases => [ qw(usage ?) ],
-    documentation => 'Prints this usage information.',
-);
+role {
 
-around _getopt_spec => sub {
-    shift;
-    shift->_gld_spec(@_);
+    my $p = shift;
+    my $getopt_conf = $p->getopt_conf;
+
+    has usage => (
+        is => 'rw', isa => 'Getopt::Long::Descriptive::Usage',
+        traits => ['NoGetopt'],
+    );
+
+    # captures the options: --help --usage --?
+    has help_flag => (
+        is => 'ro', isa => 'Bool',
+        traits => ['Getopt'],
+        cmd_flag => 'help',
+        cmd_aliases => [ qw(usage ?) ],
+        documentation => 'Prints this usage information.',
+    );
+
+    around _getopt_spec => sub {
+        shift;
+        shift->_gld_spec(@_);
+    };
+
+    around _getopt_get_options => sub {
+        shift;
+        my ($class, $params, $opt_spec) = @_;
+        # Check if a special args hash were already passed, or create a new one
+        my $args = ref($opt_spec->[-1]) eq 'HASH' ? pop @$opt_spec : {};
+        unshift @{$args->{getopt_conf}}, @$getopt_conf;
+        push @$opt_spec, $args;
+        return Getopt::Long::Descriptive::describe_options($class->_usage_format(%$params), @$opt_spec);
+    };
+
+    method _gld_spec => sub {
+        my ( $class, %params ) = @_;
+
+        my ( @options, %name_to_init_arg );
+
+        my $constructor_params = $params{params};
+
+        foreach my $opt ( @{ $params{options} } ) {
+            push @options, [
+                $opt->{opt_string},
+                $opt->{doc} || ' ', # FIXME new GLD shouldn't need this hack
+                {
+                    ( ( $opt->{required} && !exists($constructor_params->{$opt->{init_arg}}) ) ? (required => $opt->{required}) : () ),
+                    # NOTE:
+                    # remove this 'feature' because it didn't work
+                    # all the time, and so is better to not bother
+                    # since Moose will handle the defaults just
+                    # fine anyway.
+                    # - SL
+                    #( exists $opt->{default}  ? (default  => $opt->{default})  : () ),
+                },
+            ];
+
+            my $identifier = lc($opt->{name});
+            $identifier =~ s/\W/_/g; # Getopt::Long does this to all option names
+
+            $name_to_init_arg{$identifier} = $opt->{init_arg};
+        }
+
+        return ( \@options, \%name_to_init_arg );
+    }
 };
 
-around _getopt_get_options => sub {
-    shift;
-    my ($class, $params, $opt_spec) = @_;
-    return Getopt::Long::Descriptive::describe_options($class->_usage_format(%$params), @$opt_spec);
-};
-
-sub _gld_spec {
-    my ( $class, %params ) = @_;
-
-    my ( @options, %name_to_init_arg );
-
-    my $constructor_params = $params{params};
-
-    foreach my $opt ( @{ $params{options} } ) {
-        push @options, [
-            $opt->{opt_string},
-            $opt->{doc} || ' ', # FIXME new GLD shouldn't need this hack
-            {
-                ( ( $opt->{required} && !exists($constructor_params->{$opt->{init_arg}}) ) ? (required => $opt->{required}) : () ),
-                # NOTE:
-                # remove this 'feature' because it didn't work
-                # all the time, and so is better to not bother
-                # since Moose will handle the defaults just
-                # fine anyway.
-                # - SL
-                #( exists $opt->{default}  ? (default  => $opt->{default})  : () ),
-            },
-        ];
-
-        my $identifier = lc($opt->{name});
-        $identifier =~ s/\W/_/g; # Getopt::Long does this to all option names
-
-        $name_to_init_arg{$identifier} = $opt->{init_arg};
-    }
-
-    return ( \@options, \%name_to_init_arg );
-}
-
-no Moose::Role;
 
 1;
 
@@ -92,6 +106,10 @@
 
   with 'MooseX::Getopt::GLD';
 
+  # or
+
+  with 'MooseX::Getopt::GLD' => { getopt_conf => [ 'pass_through', ... ] };
+
   has 'out' => (is => 'rw', isa => 'Str', required => 1);
   has 'in'  => (is => 'rw', isa => 'Str', required => 1);
 
@@ -107,6 +125,13 @@
 
   ## on the command line
   % perl my_app_script.pl -in file.input -out file.dump
+
+=head1 OPTIONS
+
+This role is a parameterized role. It accepts one configuration parameter,
+C<getopt_conf>. This parameter is an ArrayRef of strings, which are
+L<Getopt::Long> configuraion options (see "Configuring Getopt::Long" in
+L<Getopt::Long>)
 
 =head1 AUTHORS
 

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=72956&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 Thu Apr 21 16:48:30 2011
@@ -3,7 +3,7 @@
   $MooseX::Getopt::Meta::Attribute::AUTHORITY = 'cpan:STEVAN';
 }
 BEGIN {
-  $MooseX::Getopt::Meta::Attribute::VERSION = '0.35';
+  $MooseX::Getopt::Meta::Attribute::VERSION = '0.37';
 }
 # ABSTRACT: Optional meta attribute for custom option names
 

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=72956&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 Thu Apr 21 16:48:30 2011
@@ -3,7 +3,7 @@
   $MooseX::Getopt::Meta::Attribute::NoGetopt::AUTHORITY = 'cpan:STEVAN';
 }
 BEGIN {
-  $MooseX::Getopt::Meta::Attribute::NoGetopt::VERSION = '0.35';
+  $MooseX::Getopt::Meta::Attribute::NoGetopt::VERSION = '0.37';
 }
 # ABSTRACT: Optional meta attribute for ignoring params
 

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=72956&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 Thu Apr 21 16:48:30 2011
@@ -3,7 +3,7 @@
   $MooseX::Getopt::Meta::Attribute::Trait::AUTHORITY = 'cpan:STEVAN';
 }
 BEGIN {
-  $MooseX::Getopt::Meta::Attribute::Trait::VERSION = '0.35';
+  $MooseX::Getopt::Meta::Attribute::Trait::VERSION = '0.37';
 }
 # ABSTRACT: Optional meta attribute trait for custom option names
 

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=72956&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 Thu Apr 21 16:48:30 2011
@@ -3,7 +3,7 @@
   $MooseX::Getopt::Meta::Attribute::Trait::NoGetopt::AUTHORITY = 'cpan:STEVAN';
 }
 BEGIN {
-  $MooseX::Getopt::Meta::Attribute::Trait::NoGetopt::VERSION = '0.35';
+  $MooseX::Getopt::Meta::Attribute::Trait::NoGetopt::VERSION = '0.37';
 }
 # ABSTRACT: Optional meta attribute trait for ignoring params
 

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=72956&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 Thu Apr 21 16:48:30 2011
@@ -3,7 +3,7 @@
   $MooseX::Getopt::OptionTypeMap::AUTHORITY = 'cpan:STEVAN';
 }
 BEGIN {
-  $MooseX::Getopt::OptionTypeMap::VERSION = '0.35';
+  $MooseX::Getopt::OptionTypeMap::VERSION = '0.37';
 }
 # ABSTRACT: Storage for the option to type mappings
 

Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/ProcessedArgv.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/ProcessedArgv.pm?rev=72956&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/ProcessedArgv.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/ProcessedArgv.pm Thu Apr 21 16:48:30 2011
@@ -3,7 +3,7 @@
   $MooseX::Getopt::ProcessedArgv::AUTHORITY = 'cpan:STEVAN';
 }
 BEGIN {
-  $MooseX::Getopt::ProcessedArgv::VERSION = '0.35';
+  $MooseX::Getopt::ProcessedArgv::VERSION = '0.37';
 }
 use Moose;
 # ABSTRACT: MooseX::Getopt::ProcessedArgv - Class containing the results of process_argv

Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Strict.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Strict.pm?rev=72956&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Strict.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt/Strict.pm Thu Apr 21 16:48:30 2011
@@ -3,7 +3,7 @@
   $MooseX::Getopt::Strict::AUTHORITY = 'cpan:STEVAN';
 }
 BEGIN {
-  $MooseX::Getopt::Strict::VERSION = '0.35';
+  $MooseX::Getopt::Strict::VERSION = '0.37';
 }
 # ABSTRACT: only make options for attrs with the Getopt metaclass
 

Added: branches/upstream/libmoosex-getopt-perl/current/t/111_gld_pass_through.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-getopt-perl/current/t/111_gld_pass_through.t?rev=72956&op=file
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/t/111_gld_pass_through.t (added)
+++ branches/upstream/libmoosex-getopt-perl/current/t/111_gld_pass_through.t Thu Apr 21 16:48:30 2011
@@ -1,0 +1,55 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 5;
+
+use Test::Requires {
+    'Getopt::Long::Descriptive' => 0.01, # skip all if not installed
+};
+
+use_ok('MooseX::Getopt::GLD');
+
+{
+    package Engine::Foo;
+    use Moose;
+
+    with 'MooseX::Getopt::GLD' => { getopt_conf => [ 'pass_through' ] };
+
+    has 'foo' => (
+        metaclass   => 'Getopt',
+        is          => 'ro',
+        isa         => 'Int',
+    );
+}
+
+{
+    package Engine::Bar;
+    use Moose;
+
+    with 'MooseX::Getopt::GLD' => { getopt_conf => [ 'pass_through' ] };;
+
+    has 'bar' => (
+        metaclass   => 'Getopt',
+        is          => 'ro',
+        isa         => 'Int',
+    );
+}
+
+local @ARGV = ('--foo=10', '--bar=42');
+
+{
+    my $foo = Engine::Foo->new_with_options();
+    isa_ok($foo, 'Engine::Foo');
+    is($foo->foo, 10, '... got the right value (10)');
+}
+
+{
+    my $bar = Engine::Bar->new_with_options();
+    isa_ok($bar, 'Engine::Bar');
+    is($bar->bar, 42, '... got the right value (42)');
+}
+
+
+




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