r22634 - in /trunk/libmoosex-getopt-perl: Build.PL ChangeLog MANIFEST META.yml Makefile.PL debian/changelog debian/compat debian/control debian/rules inc/ lib/MooseX/Getopt.pm t/008_configfromfile.t
eloy at users.alioth.debian.org
eloy at users.alioth.debian.org
Tue Jul 1 11:30:57 UTC 2008
Author: eloy
Date: Tue Jul 1 11:30:57 2008
New Revision: 22634
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=22634
Log:
* New upstream release
* debian/control:
+ Build-Depends: libmodule-build-perl replaced by libmodule-install-perl,
increase debhelper dependency to (>= 7)
+ Standards-Version: updated to 3.8.0
+ Uploaders: added me
* debian/rules: used simple example from debhelper 7
* debian/compat: increase to 7
Added:
trunk/libmoosex-getopt-perl/inc/
- copied from r22633, branches/upstream/libmoosex-getopt-perl/current/inc/
trunk/libmoosex-getopt-perl/t/008_configfromfile.t
- copied unchanged from r22633, branches/upstream/libmoosex-getopt-perl/current/t/008_configfromfile.t
Removed:
trunk/libmoosex-getopt-perl/Build.PL
Modified:
trunk/libmoosex-getopt-perl/ChangeLog
trunk/libmoosex-getopt-perl/MANIFEST
trunk/libmoosex-getopt-perl/META.yml
trunk/libmoosex-getopt-perl/Makefile.PL
trunk/libmoosex-getopt-perl/debian/changelog
trunk/libmoosex-getopt-perl/debian/compat
trunk/libmoosex-getopt-perl/debian/control
trunk/libmoosex-getopt-perl/debian/rules
trunk/libmoosex-getopt-perl/lib/MooseX/Getopt.pm
Modified: trunk/libmoosex-getopt-perl/ChangeLog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-getopt-perl/ChangeLog?rev=22634&op=diff
==============================================================================
--- trunk/libmoosex-getopt-perl/ChangeLog (original)
+++ trunk/libmoosex-getopt-perl/ChangeLog Tue Jul 1 11:30:57 2008
@@ -1,11 +1,24 @@
Revision history for Perl extension MooseX-Getopt
+
+0.13 Saturday, May 24, 2008
+ * MooseX::Getopt
+ - Commandline option shouldn't be required in the
+ case that the given "required" attribute has
+ been loaded from config (MooseX::ConfigFromFile)
+ - Support for MooseX::ConfigFromFile shouldn't require
+ that role be added at the same level as Getopt.
+ - fixed miscapitalization of NoGetopt in the docs
+ - added links to the traits in the docs
+
+ ~ converted to Module::Install instead of
+ Module::Build
0.12 Fri. March 14, 2008
~~ updated copyright dates ~~
-
+
- upped the Moose dependency to support
the custom metaclass traits
- - added Getopt::Long::Descriptive as an
+ - added Getopt::Long::Descriptive as an
optional dependency
* MooseX::Getopt
@@ -13,7 +26,7 @@
MooseX::Getopt::Meta::Attribute::Trait
MooseX::Getopt::Meta::Attribute::NoGetopt
MooseX::Getopt::Meta::Attribute::Trait::NoGetopt
- - added support for custom metaclass traits
+ - added support for custom metaclass traits
- added tests for this
0.11 Sun. Jan. 27, 2008
@@ -38,37 +51,37 @@
the -configfile commandline option.
0.07 Tues. Dec. 4, 2007
- * MooseX::Getopt::Meta::Attribute::NoGetopt
+ * MooseX::Getopt::Meta::Attribute::NoGetopt
- fixed miscapitalization of NoGetopt in the docs
0.06 Fri. Nov. 23, 2007
* MooseX::Getopt
- - refactored &new_with_option some so that
- this will work better with other Getopt
+ - refactored &new_with_option some so that
+ this will work better with other Getopt
modules (nuffin)
-
+
+ MooseX::Getopt::Strict
- - version of MooseX::Getopt which requires
- you to specify which attributes you want
+ - version of MooseX::Getopt which requires
+ you to specify which attributes you want
processed explicity
- added tests for this
-
+
+ MooseX::Getopt::Meta::Attribute::NoGetopt
- - a custom meta-attribute which can be
- used to specify that an attribute should
+ - a custom meta-attribute which can be
+ used to specify that an attribute should
not be processed
- added tests for this
0.05 Tues. July 3, 2007
* MooseX::Getopt::OptionTypeMap
- - added some checks to make sure that the type
- constraints are found properly and to give
+ - added some checks to make sure that the type
+ constraints are found properly and to give
better diagnostics
0.04 Tues. June 26, 2007
* MooseX::Getopt::OptionTypeMap
- Added support for subtype constraint inference
- from parent types
+ from parent types
- added tests and docs for this
* MooseX::Getopt
- Added extra_argv attribute
@@ -83,13 +96,13 @@
~ downgraded the Getopt version requirement
to 2.35 as per RT #26844
~ adding blblack to the authors list
-
- * MooseX::Getopt
- - doc update to show simple way to of excluding
- an attribute, but not having accessors with
+
+ * MooseX::Getopt
+ - doc update to show simple way to of excluding
+ an attribute, but not having accessors with
underscores (thanks to Zaba on #moose for this)
* MooseX::Getopt::Meta::Attribute
- - tightening up the type constraint in the
+ - tightening up the type constraint in the
cmd_alias coercion to only accept strings
0.02 Friday, April 6, 2007
@@ -100,7 +113,7 @@
* MooseX::Getopt::Meta::Attribute
- added the cmd_aliases attribute (thanks to blblack)
- added tests and docs for this
- - added support for Moose 0.19's custom
+ - added support for Moose 0.19's custom
attribute metaclass alias registry.
- added tests and docs for this
Modified: trunk/libmoosex-getopt-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-getopt-perl/MANIFEST?rev=22634&op=diff
==============================================================================
--- trunk/libmoosex-getopt-perl/MANIFEST (original)
+++ trunk/libmoosex-getopt-perl/MANIFEST Tue Jul 1 11:30:57 2008
@@ -1,5 +1,15 @@
-Build.PL
ChangeLog
+inc/Module/AutoInstall.pm
+inc/Module/Install.pm
+inc/Module/Install/AutoInstall.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Fetch.pm
+inc/Module/Install/Include.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
lib/MooseX/Getopt.pm
lib/MooseX/Getopt/Meta/Attribute.pm
lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm
@@ -19,5 +29,6 @@
t/005_strict.t
t/006_metaclass_traits.t
t/007_nogetopt_trait.t
+t/008_configfromfile.t
t/pod.t
t/pod_coverage.t
Modified: trunk/libmoosex-getopt-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-getopt-perl/META.yml?rev=22634&op=diff
==============================================================================
--- trunk/libmoosex-getopt-perl/META.yml (original)
+++ trunk/libmoosex-getopt-perl/META.yml Tue Jul 1 11:30:57 2008
@@ -1,41 +1,24 @@
---
-name: MooseX-Getopt
-version: 0.12
+abstract: 'A Moose role for processing command line options'
author:
- - 'Stevan Little E<lt>stevan at iinteractive.comE<gt>'
- - 'Brandon L. Black, E<lt>blblack at gmail.comE<gt>'
-abstract: A Moose role for processing command line options
-license: perl
-resources:
- license: http://dev.perl.org/licenses/
-requires:
- Getopt::Long: 2.34
- Moose: 0.39
+ - 'Stevan Little <stevan at iinteractive.com>'
build_requires:
Test::Exception: 0.21
Test::More: 0.62
-provides:
- MooseX::Getopt:
- file: lib/MooseX/Getopt.pm
- version: 0.12
- MooseX::Getopt::Meta::Attribute:
- file: lib/MooseX/Getopt/Meta/Attribute.pm
- version: 0.05
- MooseX::Getopt::Meta::Attribute::NoGetopt:
- file: lib/MooseX/Getopt/Meta/Attribute/NoGetopt.pm
- version: 0.02
- MooseX::Getopt::Meta::Attribute::Trait:
- file: lib/MooseX/Getopt/Meta/Attribute/Trait.pm
- version: 0.01
- MooseX::Getopt::Meta::Attribute::Trait::NoGetopt:
- file: lib/MooseX/Getopt/Meta/Attribute/Trait/NoGetopt.pm
- version: 0.01
- MooseX::Getopt::OptionTypeMap:
- file: lib/MooseX/Getopt/OptionTypeMap.pm
- version: 0.03
- MooseX::Getopt::Strict:
- file: lib/MooseX/Getopt/Strict.pm
-generated_by: Module::Build version 0.2808
+distribution_type: module
+generated_by: 'Module::Install version 0.73'
+license: perl
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.2.html
- version: 1.2
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+ version: 1.3
+name: MooseX-Getopt
+no_index:
+ directory:
+ - inc
+ - t
+requires:
+ Getopt::Long: 2.37
+ Getopt::Long::Descriptive: 0
+ Moose: 0.43
+tests: t/*.t
+version: 0.13
Modified: trunk/libmoosex-getopt-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-getopt-perl/Makefile.PL?rev=22634&op=diff
==============================================================================
--- trunk/libmoosex-getopt-perl/Makefile.PL (original)
+++ trunk/libmoosex-getopt-perl/Makefile.PL Tue Jul 1 11:30:57 2008
@@ -1,17 +1,20 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.03
-use ExtUtils::MakeMaker;
-WriteMakefile
-(
- 'NAME' => 'MooseX::Getopt',
- 'VERSION_FROM' => 'lib/MooseX/Getopt.pm',
- 'PREREQ_PM' => {
- 'Getopt::Long' => '2.34',
- 'Moose' => '0.39',
- 'Test::Exception' => '0.21',
- 'Test::More' => '0.62'
- },
- 'INSTALLDIRS' => 'site',
- 'EXE_FILES' => [],
- 'PL_FILES' => {}
- )
-;
+use inc::Module::Install;
+
+name 'MooseX-Getopt';
+license 'perl';
+
+all_from 'lib/MooseX/Getopt.pm';
+
+requires 'Moose' => '0.43';
+requires 'Getopt::Long' => '2.37';
+
+# optional
+requires 'Getopt::Long::Descriptive' => 0;
+
+build_requires 'Test::More' => '0.62';
+build_requires 'Test::Exception' => '0.21';
+
+tests_recursive();
+auto_install;
+
+WriteAll;
Modified: trunk/libmoosex-getopt-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-getopt-perl/debian/changelog?rev=22634&op=diff
==============================================================================
--- trunk/libmoosex-getopt-perl/debian/changelog (original)
+++ trunk/libmoosex-getopt-perl/debian/changelog Tue Jul 1 11:30:57 2008
@@ -1,3 +1,16 @@
+libmoosex-getopt-perl (0.13-1) UNRELEASED; urgency=low
+
+ * New upstream release
+ * debian/control:
+ + Build-Depends: libmodule-build-perl replaced by libmodule-install-perl,
+ increase debhelper dependency to (>= 7)
+ + Standards-Version: updated to 3.8.0
+ + Uploaders: added me
+ * debian/rules: used simple example from debhelper 7
+ * debian/compat: increase to 7
+
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Tue, 01 Jul 2008 13:22:30 +0200
+
libmoosex-getopt-perl (0.12-1) unstable; urgency=low
* New upstream release.
Modified: trunk/libmoosex-getopt-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-getopt-perl/debian/compat?rev=22634&op=diff
==============================================================================
--- trunk/libmoosex-getopt-perl/debian/compat (original)
+++ trunk/libmoosex-getopt-perl/debian/compat Tue Jul 1 11:30:57 2008
@@ -1,1 +1,1 @@
-6
+7
Modified: trunk/libmoosex-getopt-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-getopt-perl/debian/control?rev=22634&op=diff
==============================================================================
--- trunk/libmoosex-getopt-perl/debian/control (original)
+++ trunk/libmoosex-getopt-perl/debian/control Tue Jul 1 11:30:57 2008
@@ -1,14 +1,15 @@
Source: libmoosex-getopt-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 6), libmodule-build-perl, quilt
+Build-Depends: debhelper (>= 7), libmodule-install-perl, quilt
Build-Depends-Indep: perl (>= 5.8.8-7), libmoose-perl (>= 0.33),
libtest-pod-perl, libtest-pod-coverage-perl, libtest-exception-perl,
libclass-mop-perl (>= 0.49)
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Damyan Ivanov <dmn at debian.org>, Niko Tyni <ntyni at debian.org>,
- gregor herrmann <gregor+debian at comodo.priv.at>
-Standards-Version: 3.7.3
+ gregor herrmann <gregor+debian at comodo.priv.at>,
+ Krzysztof Krzyżaniak (eloy) <eloy at debian.org>
+Standards-Version: 3.8.0
Homepage: http://search.cpan.org/dist/MooseX-Getopt/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libmoosex-getopt-perl/
Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-getopt-perl/
Modified: trunk/libmoosex-getopt-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-getopt-perl/debian/rules?rev=22634&op=diff
==============================================================================
--- trunk/libmoosex-getopt-perl/debian/rules (original)
+++ trunk/libmoosex-getopt-perl/debian/rules Tue Jul 1 11:30:57 2008
@@ -1,75 +1,22 @@
#!/usr/bin/make -f
-# This debian/rules file is provided as a template for normal perl
-# packages. It was created by Marc Brockschmidt <marc at dch-faq.de> for
-# the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may
-# be used freely wherever it is useful.
-#
-# It was later modified by Jason Kohles <email at jasonkohles.com>
-# http://www.jasonkohles.com/ to support Module::Build installed modules
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-# If set to a true value then MakeMaker's prompt function will
-# always return the default without waiting for user input.
-export PERL_MM_USE_DEFAULT=1
-
-PACKAGE=$(shell dh_listpackages)
-
-ifndef PERL
-PERL = /usr/bin/perl
-endif
-
-TMP =$(CURDIR)/debian/$(PACKAGE)
-
-include /usr/share/quilt/quilt.make
build: build-stamp
-build-stamp: $(QUILT_STAMPFN)
- dh_testdir
-
- $(PERL) Build.PL --installdirs vendor
- $(PERL) Build
- $(PERL) Build test
-
+build-stamp:
+ dh build
touch build-stamp
-clean: unpatch
- dh_testdir
- dh_testroot
+clean:
+ dh clean
- dh_clean build-stamp install-stamp
-
- [ ! -f Build ] || $(PERL) Build distclean
-
-install: install-stamp
-install-stamp: build-stamp
- dh_testdir
- dh_testroot
- dh_clean -k
-
- $(PERL) Build install destdir=$(TMP) create_packlist=0
-
+install: build install-stamp
+install-stamp:
+ dh install
touch install-stamp
-binary-arch:
-# We have nothing to do; this is arch-indep package
+binary-arch: install
-binary-indep: build install
- dh_testdir
- dh_testroot
- dh_installdocs
- dh_installchangelogs ChangeLog
- dh_perl
- dh_compress
- dh_fixperms
- dh_installdeb
- dh_gencontrol
- dh_md5sums
- dh_builddeb
-source diff:
- @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+binary-indep: install
+ dh binary-indep
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary
+binary: binary-arch binary-indep
Modified: trunk/libmoosex-getopt-perl/lib/MooseX/Getopt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmoosex-getopt-perl/lib/MooseX/Getopt.pm?rev=22634&op=diff
==============================================================================
--- trunk/libmoosex-getopt-perl/lib/MooseX/Getopt.pm (original)
+++ trunk/libmoosex-getopt-perl/lib/MooseX/Getopt.pm Tue Jul 1 11:30:57 2008
@@ -9,7 +9,7 @@
use Getopt::Long (); # GLD uses it anyway, doesn't hurt
use constant HAVE_GLD => not not eval { require Getopt::Long::Descriptive };
-our $VERSION = '0.12';
+our $VERSION = '0.13';
our $AUTHORITY = 'cpan:STEVAN';
has ARGV => (is => 'rw', isa => 'ArrayRef', metaclass => "NoGetopt");
@@ -18,32 +18,31 @@
sub new_with_options {
my ($class, @params) = @_;
- my %processed = $class->_parse_argv(
- options => [
- $class->_attrs_to_options( @params )
- ]
- );
-
- my $params = $processed{params};
-
+ my $config_from_file;
if($class->meta->does_role('MooseX::ConfigFromFile')) {
+ local @ARGV = @ARGV;
+
my $configfile;
-
- if(defined $params->{configfile}) {
- $configfile = $params->{configfile}
- }
- else {
- my $cfmeta = $class->meta->get_attribute('configfile');
+ my $opt_parser = Getopt::Long::Parser->new( config => [ qw( pass_through ) ] );
+ $opt_parser->getoptions( "configfile=s" => \$configfile );
+
+ if(!defined $configfile) {
+ my $cfmeta = $class->meta->find_attribute_by_name('configfile');
$configfile = $cfmeta->default if $cfmeta->has_default;
}
if(defined $configfile) {
- %$params = (
- %{$class->get_config_from_file($configfile)},
- %$params,
- );
+ $config_from_file = $class->get_config_from_file($configfile);
}
}
+
+ my %processed = $class->_parse_argv(
+ options => [
+ $class->_attrs_to_options( $config_from_file )
+ ]
+ );
+
+ my $params = $config_from_file ? { %$config_from_file, %{$processed{params}} } : $processed{params};
$class->new(
ARGV => $processed{argv_copy},
@@ -83,9 +82,9 @@
my $argv_mangled = [ @ARGV ];
my %constructor_args = (
- map {
- $name_to_init_arg->{$_} => $parsed_options->{$_}
- } keys %$parsed_options,
+ map {
+ $name_to_init_arg->{$_} => $parsed_options->{$_}
+ } keys %$parsed_options,
);
return (
@@ -102,7 +101,7 @@
sub _traditional_spec {
my ( $class, %params ) = @_;
-
+
my ( @options, %name_to_init_arg, %options );
foreach my $opt ( @{ $params{options} } ) {
@@ -169,6 +168,7 @@
sub _attrs_to_options {
my $class = shift;
+ my $config_from_file = shift || {};
my @options;
@@ -188,7 +188,7 @@
name => $flag,
init_arg => $attr->init_arg,
opt_string => $opt_string,
- required => $attr->is_required && !$attr->has_default && !$attr->has_builder,
+ required => $attr->is_required && !$attr->has_default && !$attr->has_builder && !exists $config_from_file->{$attr->name},
( ( $attr->has_default && ( $attr->is_default_a_coderef xor $attr->is_lazy ) ) ? ( default => $attr->default({}) ) : () ),
( $attr->has_documentation ? ( doc => $attr->documentation ) : () ),
}
@@ -209,43 +209,45 @@
=head1 SYNOPSIS
- ## In your class
+ ## In your class
package My::App;
use Moose;
-
+
with 'MooseX::Getopt';
-
+
has 'out' => (is => 'rw', isa => 'Str', required => 1);
has 'in' => (is => 'rw', isa => 'Str', required => 1);
-
+
# ... rest of the class here
-
+
## in your script
#!/usr/bin/perl
-
+
use My::App;
-
+
my $app = My::App->new_with_options();
# ... rest of the script here
-
+
## on the command line
% perl my_app_script.pl -in file.input -out file.dump
=head1 DESCRIPTION
-This is a role which provides an alternate constructor for creating
-objects using parameters passed in from the command line.
-
-This module attempts to DWIM as much as possible with the command line
-params by introspecting your class's attributes. It will use the name
-of your attribute as the command line option, and if there is a type
+This is a role which provides an alternate constructor for creating
+objects using parameters passed in from the command line.
+
+This module attempts to DWIM as much as possible with the command line
+params by introspecting your class's attributes. It will use the name
+of your attribute as the command line option, and if there is a type
constraint defined, it will configure Getopt::Long to handle the option
accordingly.
-You can use the attribute metaclass L<MooseX::Getopt::Meta::Attribute>
-to get non-default commandline option names and aliases.
-
-You can use the attribute metaclass L<MooseX::Getopt::Meta::Attribute::NoGetOpt>
+You can use the trait L<MooseX::Getopt::Meta::Attribute::Trait> or the
+attribute metaclass L<MooseX::Getopt::Meta::Attribute> to get non-default
+commandline option names and aliases.
+
+You can use the trait L<MooseX::Getopt::Meta::Attribute::Trait::NoGetopt>
+or the attribute metaclass L<MooseX::Getopt::Meta::Attribute::NoGetopt>
to have C<MooseX::Getopt> ignore your attribute in the commandline options.
By default, attributes which start with an underscore are not given
@@ -255,12 +257,12 @@
# for read/write attributes
has '_foo' => (accessor => 'foo', ...);
-
+
# or for read-only attributes
- has '_bar' => (reader => 'bar', ...);
-
-This will mean that Getopt will not handle a --foo param, but your
-code can still call the C<foo> method.
+ has '_bar' => (reader => 'bar', ...);
+
+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>,
@@ -278,20 +280,20 @@
=item I<Bool>
-A I<Bool> type constraint is set up as a boolean option with
+A I<Bool> type constraint is set up as a boolean option with
Getopt::Long. So that this attribute description:
has 'verbose' => (is => 'rw', isa => 'Bool');
-would translate into C<verbose!> as a Getopt::Long option descriptor,
+would translate into C<verbose!> as a Getopt::Long option descriptor,
which would enable the following command line options:
% my_script.pl --verbose
- % my_script.pl --noverbose
-
+ % my_script.pl --noverbose
+
=item I<Int>, I<Float>, I<Str>
-These type constraints are set up as properly typed options with
+These type constraints are set up as properly typed options with
Getopt::Long, using the C<=i>, C<=f> and C<=s> modifiers as appropriate.
=item I<ArrayRef>
@@ -300,12 +302,12 @@
in Getopt::Long. So that this attribute description:
has 'include' => (
- is => 'rw',
- isa => 'ArrayRef',
+ is => 'rw',
+ isa => 'ArrayRef',
default => sub { [] }
);
-would translate into C<includes=s@> as a Getopt::Long option descriptor,
+would translate into C<includes=s@> as a Getopt::Long option descriptor,
which would enable the following command line options:
% my_script.pl --include /usr/lib --include /usr/local/lib
@@ -316,12 +318,12 @@
in Getopt::Long. So that this attribute description:
has 'define' => (
- is => 'rw',
- isa => 'HashRef',
+ is => 'rw',
+ isa => 'HashRef',
default => sub { {} }
);
-would translate into C<define=s%> as a Getopt::Long option descriptor,
+would translate into C<define=s%> as a Getopt::Long option descriptor,
which would enable the following command line options:
% my_script.pl --define os=linux --define vendor=debian
@@ -330,9 +332,9 @@
=head2 Custom Type Constraints
-It is possible to create custom type constraint to option spec
+It is possible to create custom type constraint to option spec
mappings if you need them. The process is fairly simple (but a
-little verbose maybe). First you create a custom subtype, like
+little verbose maybe). First you create a custom subtype, like
so:
subtype 'ArrayOfInts'
@@ -345,7 +347,7 @@
'ArrayOfInts' => '=i@'
);
-Now any attribute declarations using this type constraint will
+Now any attribute declarations using this type constraint will
get the custom option spec. So that, this:
has 'nums' => (
@@ -358,7 +360,7 @@
% my_script.pl --nums 5 --nums 88 --nums 199
-This example is fairly trivial, but more complex validations are
+This example is fairly trivial, but more complex validations are
easily possible with a little creativity. The trick is balancing
the type constraint validations with the Getopt::Long validations.
@@ -384,7 +386,7 @@
=item B<new_with_options (%params)>
-This method will take a set of default C<%params> and then collect
+This method will take a set of default C<%params> and then collect
params from the command line (possibly overriding those in C<%params>)
and then return a newly constructed object.
@@ -413,7 +415,7 @@
=head1 BUGS
-All complex software has bugs lurking in it, and this module is no
+All complex software has bugs lurking in it, and this module is no
exception. If you find a bug please either email me, or add the bug
to cpan-RT.
@@ -423,6 +425,10 @@
Brandon L. Black, E<lt>blblack at gmail.comE<gt>
+=head1 CONTRIBUTORS
+
+Ryan D Johnson, E<lt>ryan at innerfence.comE<gt>
+
=head1 COPYRIGHT AND LICENSE
Copyright 2007-2008 by Infinity Interactive, Inc.
More information about the Pkg-perl-cvs-commits
mailing list