r11505 - in /branches/upstream/libmoosex-getopt-perl/current: ChangeLog META.yml Makefile.PL lib/MooseX/Getopt.pm
tincho-guest at users.alioth.debian.org
tincho-guest at users.alioth.debian.org
Sun Dec 23 13:16:07 UTC 2007
Author: tincho-guest
Date: Sun Dec 23 13:16:07 2007
New Revision: 11505
URL: http://svn.debian.org/wsvn/?sc=1&rev=11505
Log:
[svn-upgrade] Integrating new upstream version, libmoosex-getopt-perl (0.08)
Modified:
branches/upstream/libmoosex-getopt-perl/current/ChangeLog
branches/upstream/libmoosex-getopt-perl/current/META.yml
branches/upstream/libmoosex-getopt-perl/current/Makefile.PL
branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm
Modified: branches/upstream/libmoosex-getopt-perl/current/ChangeLog
URL: http://svn.debian.org/wsvn/branches/upstream/libmoosex-getopt-perl/current/ChangeLog?rev=11505&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/ChangeLog (original)
+++ branches/upstream/libmoosex-getopt-perl/current/ChangeLog Sun Dec 23 13:16:07 2007
@@ -1,4 +1,10 @@
Revision history for Perl extension MooseX-Getopt
+
+0.08 Tues. Dec. 8, 2007
+ * MooseX::Getopt
+ - Added support for configfile loading via
+ MooseX::ConfigFromFile-based roles with
+ the -configfile commandline option.
0.07 Tues. Dec. 4, 2007
* MooseX::Getopt::Meta::Attribute::NoGetopt
Modified: branches/upstream/libmoosex-getopt-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libmoosex-getopt-perl/current/META.yml?rev=11505&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/META.yml (original)
+++ branches/upstream/libmoosex-getopt-perl/current/META.yml Sun Dec 23 13:16:07 2007
@@ -1,6 +1,6 @@
---
name: MooseX-Getopt
-version: 0.07
+version: 0.08
author:
- 'Stevan Little E<lt>stevan at iinteractive.comE<gt>'
- 'Brandon L. Black, E<lt>blblack at gmail.comE<gt>'
@@ -17,7 +17,7 @@
provides:
MooseX::Getopt:
file: lib/MooseX/Getopt.pm
- version: 0.07
+ version: 0.08
MooseX::Getopt::Meta::Attribute:
file: lib/MooseX/Getopt/Meta/Attribute.pm
version: 0.04
Modified: branches/upstream/libmoosex-getopt-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libmoosex-getopt-perl/current/Makefile.PL?rev=11505&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/Makefile.PL (original)
+++ branches/upstream/libmoosex-getopt-perl/current/Makefile.PL Sun Dec 23 13:16:07 2007
@@ -2,16 +2,16 @@
use ExtUtils::MakeMaker;
WriteMakefile
(
+ 'PL_FILES' => {},
+ 'INSTALLDIRS' => 'site',
'NAME' => 'MooseX::Getopt',
+ 'EXE_FILES' => [],
'VERSION_FROM' => 'lib/MooseX/Getopt.pm',
'PREREQ_PM' => {
+ 'Test::More' => '0.62',
'Getopt::Long' => '2.34',
- 'Moose' => '0.19',
'Test::Exception' => '0.21',
- 'Test::More' => '0.62'
- },
- 'INSTALLDIRS' => 'site',
- 'EXE_FILES' => [],
- 'PL_FILES' => {}
+ 'Moose' => '0.19'
+ }
)
;
Modified: branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm?rev=11505&op=diff
==============================================================================
--- branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm (original)
+++ branches/upstream/libmoosex-getopt-perl/current/lib/MooseX/Getopt.pm Sun Dec 23 13:16:07 2007
@@ -8,7 +8,7 @@
use MooseX::Getopt::Meta::Attribute;
use MooseX::Getopt::Meta::Attribute::NoGetopt;
-our $VERSION = '0.07';
+our $VERSION = '0.08';
our $AUTHORITY = 'cpan:STEVAN';
has ARGV => (is => 'rw', isa => 'ArrayRef');
@@ -23,11 +23,21 @@
]
);
+ my $params = $processed{params};
+
+ if($class->meta->does_role('MooseX::ConfigFromFile')
+ && defined $params->{configfile}) {
+ %$params = (
+ %{$class->get_config_from_file($params->{configfile})},
+ %$params,
+ );
+ }
+
$class->new(
ARGV => $processed{argv_copy},
extra_argv => $processed{argv},
@params, # explicit params to ->new
- %{ $processed{params} }, # params from CLI
+ %$params, # params from CLI
);
}
@@ -179,6 +189,11 @@
This will mean that Getopt will not handle a --foo param, but your
code can still call the C<foo> method.
+If your class also uses a configfile-loading role based on
+L<MooseX::ConfigFromFile>, such as L<MooseX::SimpleConfig>,
+L<MooseX::Getopt>'s C<new_with_options> will load the configfile
+specified by the C<--configfile> option for you.
+
=head2 Supported Type Constraints
=over 4
More information about the Pkg-perl-cvs-commits
mailing list