Hello community,

here is the log from the commit of package perl-MooseX-Types-Common for 
openSUSE:Factory checked in at 2012-02-16 14:59:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-MooseX-Types-Common (Old)
 and      /work/SRC/openSUSE:Factory/.perl-MooseX-Types-Common.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-MooseX-Types-Common", Maintainer is ""

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-MooseX-Types-Common/perl-MooseX-Types-Common.changes
        2011-11-21 12:43:41.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.perl-MooseX-Types-Common.new/perl-MooseX-Types-Common.changes
   2012-02-16 14:59:50.000000000 +0100
@@ -1,0 +2,7 @@
+Tue Feb 14 08:04:13 UTC 2012 - [email protected]
+
+- updated to 0.001004
+  - use Test::Fatal instead of Test::Exception (Justin Hunter)
+  - Added {Lower,Upper}CaseSimpleStr and {Lower,Upper}CaseStr, RT #71133
+
+-------------------------------------------------------------------

Old:
----
  MooseX-Types-Common-0.001003.tar.gz

New:
----
  MooseX-Types-Common-0.001004.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-MooseX-Types-Common.spec ++++++
--- /var/tmp/diff_new_pack.HIWd3k/_old  2012-02-16 14:59:51.000000000 +0100
+++ /var/tmp/diff_new_pack.HIWd3k/_new  2012-02-16 14:59:51.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-MooseX-Types-Common
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,31 +16,33 @@
 #
 
 
-
 Name:           perl-MooseX-Types-Common
-Version:        0.001003
-Release:        1
-License:        GPL-1.0+ or Artistic-1.0
+Version:        0.001004
+Release:        0
 %define cpan_name MooseX-Types-Common
 Summary:        A library of commonly used type constraints
-Url:            http://search.cpan.org/dist/MooseX-Types-Common/
+License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
+Url:            http://search.cpan.org/dist/MooseX-Types-Common/
 Source:         
http://www.cpan.org/authors/id/A/AR/ARCANEZ/%{cpan_name}-%{version}.tar.gz
 BuildArch:      noarch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl
 BuildRequires:  perl-macros
-BuildRequires:  perl(Capture::Tiny)
-BuildRequires:  perl(inc::Module::Install)
-BuildRequires:  perl(JSON)
-BuildRequires:  perl(LWP::Simple)
-BuildRequires:  perl(Module::Build)
 BuildRequires:  perl(Moose) >= 0.39
 BuildRequires:  perl(MooseX::Types) >= 0.04
-BuildRequires:  perl(MooseX::Types::Moose)
-BuildRequires:  perl(Parse::CPAN::Meta)
-BuildRequires:  perl(Test::Exception)
-BuildRequires:  perl(YAML::Tiny)
+BuildRequires:  perl(Test::Fatal)
+#BuildRequires: perl(Capture::Tiny)
+#BuildRequires: perl(inc::Module::Install)
+#BuildRequires: perl(JSON)
+#BuildRequires: perl(LWP::Simple)
+#BuildRequires: perl(Module::Build)
+#BuildRequires: perl(Module::Install::Base)
+#BuildRequires: perl(MooseX::Types::Common::Numeric)
+#BuildRequires: perl(MooseX::Types::Common::String)
+#BuildRequires: perl(MooseX::Types::Moose)
+#BuildRequires: perl(Parse::CPAN::Meta)
+#BuildRequires: perl(YAML::Tiny)
 Requires:       perl(Moose) >= 0.39
 Requires:       perl(MooseX::Types) >= 0.04
 %{perl_requires}
@@ -64,11 +66,8 @@
 %perl_process_packlist
 %perl_gen_filelist
 
-%clean
-%{__rm} -rf %{buildroot}
-
 %files -f %{name}.files
 %defattr(-,root,root,755)
-%doc Changes README
+%doc Changes MYMETA.json MYMETA.yml README
 
 %changelog

++++++ MooseX-Types-Common-0.001003.tar.gz -> 
MooseX-Types-Common-0.001004.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MooseX-Types-Common-0.001003/Changes 
new/MooseX-Types-Common-0.001004/Changes
--- old/MooseX-Types-Common-0.001003/Changes    2011-08-31 17:34:50.000000000 
+0200
+++ new/MooseX-Types-Common-0.001004/Changes    2011-12-06 05:30:35.000000000 
+0100
@@ -1,3 +1,6 @@
+0.001004 2011-12-05 23:30EST
+  - use Test::Fatal instead of Test::Exception (Justin Hunter)
+  - Added {Lower,Upper}CaseSimpleStr and {Lower,Upper}CaseStr, RT #71133
 0.001003 2011-08-31 11:35EST
   - The positive and negative number types mistakenly accepted zero. Reported
     by Eric Brine. RT #53234.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MooseX-Types-Common-0.001003/MANIFEST 
new/MooseX-Types-Common-0.001004/MANIFEST
--- old/MooseX-Types-Common-0.001003/MANIFEST   2011-08-31 17:36:20.000000000 
+0200
+++ new/MooseX-Types-Common-0.001004/MANIFEST   2011-12-06 05:32:05.000000000 
+0100
@@ -20,3 +20,4 @@
 t/01-string.t
 t/02-numeric.t
 t/03-idiot.t
+t/04-coerce.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MooseX-Types-Common-0.001003/META.yml 
new/MooseX-Types-Common-0.001004/META.yml
--- old/MooseX-Types-Common-0.001003/META.yml   2011-08-31 17:36:11.000000000 
+0200
+++ new/MooseX-Types-Common-0.001004/META.yml   2011-12-06 05:31:56.000000000 
+0100
@@ -3,13 +3,14 @@
 author:
   - 'This distribution was extracted from the L<Reaction> code base by 
Guillermo'
 build_requires:
-  ExtUtils::MakeMaker: 6.42
-  Test::Exception: 0
+  ExtUtils::MakeMaker: 6.36
+  Test::Fatal: 0
   Test::More: 0.62
 configure_requires:
-  ExtUtils::MakeMaker: 6.42
+  ExtUtils::MakeMaker: 6.36
 distribution_type: module
-generated_by: 'Module::Install version 1.01'
+dynamic_config: 1
+generated_by: 'Module::Install version 1.04'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -26,4 +27,4 @@
   IRC: irc://irc.perl.org/#moose
   license: http://dev.perl.org/licenses/
   repository: git://git.moose.perl.org/MooseX-Types-Common.git
-version: 0.001003
+version: 0.001004
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MooseX-Types-Common-0.001003/MYMETA.json 
new/MooseX-Types-Common-0.001004/MYMETA.json
--- old/MooseX-Types-Common-0.001003/MYMETA.json        2011-08-31 
17:36:11.000000000 +0200
+++ new/MooseX-Types-Common-0.001004/MYMETA.json        2011-12-06 
05:31:56.000000000 +0100
@@ -4,7 +4,7 @@
       "This distribution was extracted from the L<Reaction> code base by 
Guillermo"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter 
version 2.112150",
+   "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter 
version 2.112621",
    "license" : [
       "perl_5"
    ],
@@ -22,8 +22,8 @@
    "prereqs" : {
       "build" : {
          "requires" : {
-            "ExtUtils::MakeMaker" : "6.42",
-            "Test::Exception" : 0,
+            "ExtUtils::MakeMaker" : "6.36",
+            "Test::Fatal" : 0,
             "Test::More" : "0.62"
          }
       },
@@ -40,5 +40,5 @@
       }
    },
    "release_status" : "stable",
-   "version" : "0.001003"
+   "version" : "0.001004"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MooseX-Types-Common-0.001003/MYMETA.yml 
new/MooseX-Types-Common-0.001004/MYMETA.yml
--- old/MooseX-Types-Common-0.001003/MYMETA.yml 2011-08-31 17:36:11.000000000 
+0200
+++ new/MooseX-Types-Common-0.001004/MYMETA.yml 2011-12-06 05:31:56.000000000 
+0100
@@ -3,13 +3,13 @@
 author:
   - 'This distribution was extracted from the L<Reaction> code base by 
Guillermo'
 build_requires:
-  ExtUtils::MakeMaker: 6.42
-  Test::Exception: 0
+  ExtUtils::MakeMaker: 6.36
+  Test::Fatal: 0
   Test::More: 0.62
 configure_requires:
   ExtUtils::MakeMaker: 0
 dynamic_config: 0
-generated_by: 'ExtUtils::MakeMaker version 6.59, CPAN::Meta::Converter version 
2.112150'
+generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 
2.112621'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -22,4 +22,4 @@
 requires:
   Moose: 0.39
   MooseX::Types: 0.04
-version: 0.001003
+version: 0.001004
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MooseX-Types-Common-0.001003/Makefile.PL 
new/MooseX-Types-Common-0.001004/Makefile.PL
--- old/MooseX-Types-Common-0.001003/Makefile.PL        2011-08-31 
17:34:31.000000000 +0200
+++ new/MooseX-Types-Common-0.001004/Makefile.PL        2011-12-06 
04:05:16.000000000 +0100
@@ -12,7 +12,7 @@
 
 # things the tests need
 test_requires 'Test::More' => '0.62';
-test_requires 'Test::Exception';
+test_requires 'Test::Fatal';
 
 resources 'IRC' => 'irc://irc.perl.org/#moose';
 resources 'license' => 'http://dev.perl.org/licenses/';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MooseX-Types-Common-0.001003/README 
new/MooseX-Types-Common-0.001004/README
--- old/MooseX-Types-Common-0.001003/README     2011-08-31 17:34:31.000000000 
+0200
+++ new/MooseX-Types-Common-0.001004/README     2011-12-06 05:26:33.000000000 
+0100
@@ -1,38 +1,49 @@
-MooseX::Types::Common - A library of commonly used type constraints.
+NAME
+    MooseX::Types::Common - A library of commonly used type constraints
 
-INSTALLATION
+SYNOPSIS
+        use MooseX::Types::Common::String qw/SimpleStr/;
+        has short_str => (is => 'rw', isa => SimpleStr);
 
-To install this module, run the following commands:
+        ...
+        #this will fail
+        $object->short_str("string\nwith\nbreaks");
 
-  perl Makefile.PL
-  make
-  make test
-  make install
 
-SUPPORT AND DOCUMENTATION
 
-After installing, you can find documentation for this module with the
-perldoc command.
+        use MooseX::Types::Common::Numeric qw/PositiveInt/;
+        has count => (is => 'rw', isa => PositiveInt);
 
-    perldoc MooseX::Types:Common
+        ...
+        #this will fail
+        $object->count(-33);
 
-You can also look for information at:
+DESCRIPTION
+    A set of commonly-used type constraints that do not ship with Moose by
+    default.
 
-    RT, CPAN's request tracker
-        http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooseX-Types-Common
+SEE ALSO
+    *   MooseX::Types::Common::String
 
-    AnnoCPAN, Annotated CPAN documentation
-        http://annocpan.org/dist/MooseX-Types-Common
+    *   MooseX::Types::Common::Numeric
 
-    CPAN Ratings
-        http://cpanratings.perl.org/d/MooseX-Types-Common
+    *   MooseX::Types
 
-    Search CPAN
-        http://search.cpan.org/dist/MooseX-Types-Common
+    *   Moose::Util::TypeConstraints
 
+AUTHORS
+    This distribution was extracted from the Reaction code base by Guillermo
+    Roditi (groditi).
 
-LICENCE
+    The original authors of this library are:
 
-This is free software; you can redistribute it and/or modify it under
-the same terms as the Perl 5 programming language system itself.
+    *   Matt S. Trout
+
+    *   K. J. Cheetham
+
+    *   Guillermo Roditi
+
+LICENSE
+    This library is free software, you can redistribute it and/or modify it
+    under the same terms as Perl itself.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/MooseX-Types-Common-0.001003/inc/Module/Install/Base.pm 
new/MooseX-Types-Common-0.001004/inc/Module/Install/Base.pm
--- old/MooseX-Types-Common-0.001003/inc/Module/Install/Base.pm 2011-08-31 
17:36:10.000000000 +0200
+++ new/MooseX-Types-Common-0.001004/inc/Module/Install/Base.pm 2011-12-06 
05:31:55.000000000 +0100
@@ -4,7 +4,7 @@
 use strict 'vars';
 use vars qw{$VERSION};
 BEGIN {
-       $VERSION = '1.01';
+       $VERSION = '1.04';
 }
 
 # Suspend handler for "redefined" warnings
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/MooseX-Types-Common-0.001003/inc/Module/Install/Can.pm 
new/MooseX-Types-Common-0.001004/inc/Module/Install/Can.pm
--- old/MooseX-Types-Common-0.001003/inc/Module/Install/Can.pm  2011-08-31 
17:36:10.000000000 +0200
+++ new/MooseX-Types-Common-0.001004/inc/Module/Install/Can.pm  2011-12-06 
05:31:55.000000000 +0100
@@ -9,7 +9,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.01';
+       $VERSION = '1.04';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/MooseX-Types-Common-0.001003/inc/Module/Install/Fetch.pm 
new/MooseX-Types-Common-0.001004/inc/Module/Install/Fetch.pm
--- old/MooseX-Types-Common-0.001003/inc/Module/Install/Fetch.pm        
2011-08-31 17:36:10.000000000 +0200
+++ new/MooseX-Types-Common-0.001004/inc/Module/Install/Fetch.pm        
2011-12-06 05:31:55.000000000 +0100
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.01';
+       $VERSION = '1.04';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/MooseX-Types-Common-0.001003/inc/Module/Install/Makefile.pm 
new/MooseX-Types-Common-0.001004/inc/Module/Install/Makefile.pm
--- old/MooseX-Types-Common-0.001003/inc/Module/Install/Makefile.pm     
2011-08-31 17:36:10.000000000 +0200
+++ new/MooseX-Types-Common-0.001004/inc/Module/Install/Makefile.pm     
2011-12-06 05:31:55.000000000 +0100
@@ -8,7 +8,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.01';
+       $VERSION = '1.04';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
@@ -219,14 +219,14 @@
                # an underscore, even though its own version may contain one!
                # Hence the funny regexp to get rid of it.  See RT #35800
                # for details.
-               my $v = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/;
+               my ($v) = $ExtUtils::MakeMaker::VERSION =~ /^(\d+\.\d+)/;
                $self->build_requires(     'ExtUtils::MakeMaker' => $v );
                $self->configure_requires( 'ExtUtils::MakeMaker' => $v );
        } else {
                # Allow legacy-compatibility with 5.005 by depending on the
                # most recent EU:MM that supported 5.005.
-               $self->build_requires(     'ExtUtils::MakeMaker' => 6.42 );
-               $self->configure_requires( 'ExtUtils::MakeMaker' => 6.42 );
+               $self->build_requires(     'ExtUtils::MakeMaker' => 6.36 );
+               $self->configure_requires( 'ExtUtils::MakeMaker' => 6.36 );
        }
 
        # Generate the MakeMaker params
@@ -241,7 +241,6 @@
 'all_from' if you prefer) in Makefile.PL.
 EOT
 
-       $DB::single = 1;
        if ( $self->tests ) {
                my @tests = split ' ', $self->tests;
                my %seen;
@@ -412,4 +411,4 @@
 
 __END__
 
-#line 541
+#line 540
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/MooseX-Types-Common-0.001003/inc/Module/Install/Metadata.pm 
new/MooseX-Types-Common-0.001004/inc/Module/Install/Metadata.pm
--- old/MooseX-Types-Common-0.001003/inc/Module/Install/Metadata.pm     
2011-08-31 17:36:10.000000000 +0200
+++ new/MooseX-Types-Common-0.001004/inc/Module/Install/Metadata.pm     
2011-12-06 05:31:55.000000000 +0100
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.01';
+       $VERSION = '1.04';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
@@ -151,15 +151,21 @@
 sub install_as_vendor { $_[0]->installdirs('vendor') }
 
 sub dynamic_config {
-       my $self = shift;
-       unless ( @_ ) {
-               warn "You MUST provide an explicit true/false value to 
dynamic_config\n";
-               return $self;
+       my $self  = shift;
+       my $value = @_ ? shift : 1;
+       if ( $self->{values}->{dynamic_config} ) {
+               # Once dynamic we never change to static, for safety
+               return 0;
        }
-       $self->{values}->{dynamic_config} = $_[0] ? 1 : 0;
+       $self->{values}->{dynamic_config} = $value ? 1 : 0;
        return 1;
 }
 
+# Convenience command
+sub static_config {
+       shift->dynamic_config(0);
+}
+
 sub perl_version {
        my $self = shift;
        return $self->{values}->{perl_version} unless @_;
@@ -170,7 +176,7 @@
        # Normalize the version
        $version = $self->_perl_version($version);
 
-       # We don't support the reall old versions
+       # We don't support the really old versions
        unless ( $version >= 5.005 ) {
                die "Module::Install only supports 5.005 or newer (use 
ExtUtils::MakeMaker)\n";
        }
@@ -582,7 +588,7 @@
 sub requires_from {
        my $self     = shift;
        my $content  = Module::Install::_readperl($_[0]);
-       my @requires = $content =~ 
m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg;
+       my @requires = $content =~ 
m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+(v?[\d\.]+)/mg;
        while ( @requires ) {
                my $module  = shift @requires;
                my $version = shift @requires;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/MooseX-Types-Common-0.001003/inc/Module/Install/Win32.pm 
new/MooseX-Types-Common-0.001004/inc/Module/Install/Win32.pm
--- old/MooseX-Types-Common-0.001003/inc/Module/Install/Win32.pm        
2011-08-31 17:36:10.000000000 +0200
+++ new/MooseX-Types-Common-0.001004/inc/Module/Install/Win32.pm        
2011-12-06 05:31:55.000000000 +0100
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.01';
+       $VERSION = '1.04';
        @ISA     = 'Module::Install::Base';
        $ISCORE  = 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/MooseX-Types-Common-0.001003/inc/Module/Install/WriteAll.pm 
new/MooseX-Types-Common-0.001004/inc/Module/Install/WriteAll.pm
--- old/MooseX-Types-Common-0.001003/inc/Module/Install/WriteAll.pm     
2011-08-31 17:36:10.000000000 +0200
+++ new/MooseX-Types-Common-0.001004/inc/Module/Install/WriteAll.pm     
2011-12-06 05:31:55.000000000 +0100
@@ -6,7 +6,7 @@
 
 use vars qw{$VERSION @ISA $ISCORE};
 BEGIN {
-       $VERSION = '1.01';
+       $VERSION = '1.04';
        @ISA     = qw{Module::Install::Base};
        $ISCORE  = 1;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MooseX-Types-Common-0.001003/inc/Module/Install.pm 
new/MooseX-Types-Common-0.001004/inc/Module/Install.pm
--- old/MooseX-Types-Common-0.001003/inc/Module/Install.pm      2011-08-31 
17:36:09.000000000 +0200
+++ new/MooseX-Types-Common-0.001004/inc/Module/Install.pm      2011-12-06 
05:31:55.000000000 +0100
@@ -31,7 +31,7 @@
        # This is not enforced yet, but will be some time in the next few
        # releases once we can make sure it won't clash with custom
        # Module::Install extensions.
-       $VERSION = '1.01';
+       $VERSION = '1.04';
 
        # Storage for the pseudo-singleton
        $MAIN    = undef;
@@ -451,7 +451,7 @@
 }
 
 sub _cmp ($$) {
-       _version($_[0]) <=> _version($_[1]);
+       _version($_[1]) <=> _version($_[2]);
 }
 
 # Cloned from Params::Util::_CLASS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/MooseX-Types-Common-0.001003/lib/MooseX/Types/Common/Numeric.pm 
new/MooseX-Types-Common-0.001004/lib/MooseX/Types/Common/Numeric.pm
--- old/MooseX-Types-Common-0.001003/lib/MooseX/Types/Common/Numeric.pm 
2011-08-31 17:35:29.000000000 +0200
+++ new/MooseX-Types-Common-0.001004/lib/MooseX/Types/Common/Numeric.pm 
2011-12-06 05:31:03.000000000 +0100
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.001003';
+our $VERSION = '0.001004';
 
 use MooseX::Types -declare => [
   qw(PositiveNum PositiveOrZeroNum
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/MooseX-Types-Common-0.001003/lib/MooseX/Types/Common/String.pm 
new/MooseX-Types-Common-0.001004/lib/MooseX/Types/Common/String.pm
--- old/MooseX-Types-Common-0.001003/lib/MooseX/Types/Common/String.pm  
2011-08-31 17:35:33.000000000 +0200
+++ new/MooseX-Types-Common-0.001004/lib/MooseX/Types/Common/String.pm  
2011-12-06 05:31:08.000000000 +0100
@@ -3,10 +3,18 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.001003';
+our $VERSION = '0.001004';
 
 use MooseX::Types -declare => [
-  qw(SimpleStr NonEmptySimpleStr Password StrongPassword NonEmptyStr)
+  qw(SimpleStr
+     NonEmptySimpleStr
+     LowerCaseSimpleStr
+     UpperCaseSimpleStr
+     Password
+     StrongPassword
+     NonEmptyStr
+     LowerCaseStr
+     UpperCaseStr)
 ];
 
 use MooseX::Types::Moose qw/Str/;
@@ -35,7 +43,6 @@
         : ()
     );
 
-# XXX duplicating constraint msges since moose only uses last message
 subtype Password,
   as NonEmptySimpleStr,
   where { length($_) > 3 },
@@ -72,6 +79,69 @@
         : ()
     );
 
+subtype LowerCaseStr,
+  as NonEmptyStr,
+  where { /^[a-z]+$/xms },
+  message { "Must only contain lower case letters" },
+    ( $Moose::VERSION >= 2.0200
+        ? inline_as {
+            $_[0]->parent()->_inline_check( $_[1] ) . ' && '
+                . qq{ ( $_[1] =~ m/^[a-z]+\$/xms ) };
+        }
+        : ()
+    );
+
+coerce LowerCaseStr,
+  from NonEmptyStr,
+  via { lc };
+
+subtype UpperCaseStr,
+  as NonEmptyStr,
+  where { /^[A-Z]+$/xms },
+  message { "Must only contain upper case letters" },
+    ( $Moose::VERSION >= 2.0200
+        ? inline_as {
+            $_[0]->parent()->_inline_check( $_[1] ) . ' && '
+                . qq{ ( $_[1] =~ m/^[A-Z]+\$/xms ) };
+        }
+        : ()
+    );
+
+coerce UpperCaseStr,
+  from NonEmptyStr,
+  via { uc };
+
+subtype LowerCaseSimpleStr,
+  as NonEmptySimpleStr,
+  where { /^[a-z]+$/x },
+  message { "Must only contain lower case letters" },
+    ( $Moose::VERSION >= 2.0200
+        ? inline_as {
+            $_[0]->parent()->_inline_check( $_[1] ) . ' && '
+                . qq{ ( $_[1] =~ m/^[a-z]+\$/x ) };
+        }
+        : ()
+    );
+  
+coerce LowerCaseSimpleStr,
+  from NonEmptySimpleStr,
+  via { lc };
+
+subtype UpperCaseSimpleStr,
+  as NonEmptySimpleStr,
+  where { /^[A-Z]+$/x },
+  message { "Must only contain upper case letters" },
+    ( $Moose::VERSION >= 2.0200
+        ? inline_as {
+            $_[0]->parent()->_inline_check( $_[1] ) . ' && '
+                . qq{ ( $_[1] =~ m/^[A-Z]+\$/x ) };
+        }
+        : ()
+    );
+
+coerce UpperCaseSimpleStr,
+  from NonEmptySimpleStr,
+  via { uc };
 
 1;
 
@@ -101,7 +171,17 @@
 
 =item * NonEmptySimpleStr
 
-Does what it says on the tin.
+A Str with no new-line characters and length > 0
+
+=item * LowerCaseSimpleStr
+
+A Str with no new-line characters, length > 0 and all lowercase characters
+A coercion exists via C<lc> from NonEmptySimpleStr
+
+=item * UpperCaseSimpleStr
+
+A Str with no new-line characters, length > 0 and all uppercase characters
+A coercion exists via C<uc> from NonEmptySimpleStr
 
 =item * Password
 
@@ -109,6 +189,18 @@
 
 =item * NonEmptyStr
 
+A Str with length > 0
+
+=item * LowerCaseStr
+
+A Str with length > 0 and all lowercase characters.
+A coercion exists via C<lc> from NonEmptyStr
+
+=item * UpperCaseStr
+
+A Str with length > 0 and all uppercase characters.
+A coercion exists via C<uc> from NonEmptyStr
+
 =back
 
 =head1 SEE ALSO
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/MooseX-Types-Common-0.001003/lib/MooseX/Types/Common.pm 
new/MooseX-Types-Common-0.001004/lib/MooseX/Types/Common.pm
--- old/MooseX-Types-Common-0.001003/lib/MooseX/Types/Common.pm 2011-08-31 
17:35:23.000000000 +0200
+++ new/MooseX-Types-Common-0.001004/lib/MooseX/Types/Common.pm 2011-12-06 
05:30:58.000000000 +0100
@@ -4,7 +4,7 @@
 use warnings;
 use Carp qw/cluck/;
 
-our $VERSION = '0.001003';
+our $VERSION = '0.001004';
 
 sub import {
     my $package = shift;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MooseX-Types-Common-0.001003/t/01-string.t 
new/MooseX-Types-Common-0.001004/t/01-string.t
--- old/MooseX-Types-Common-0.001003/t/01-string.t      2011-08-31 
17:34:31.000000000 +0200
+++ new/MooseX-Types-Common-0.001004/t/01-string.t      2011-12-06 
05:16:04.000000000 +0100
@@ -2,40 +2,64 @@
 
 use strict;
 use warnings;
-use Test::More tests => 14;
-use Test::Exception;
+use Test::More tests => 22;
+use Test::Fatal;
 
 {
   package FooTest;
   use Moose;
   use MooseX::Types::Common::String (
-    qw(SimpleStr NonEmptySimpleStr Password StrongPassword NonEmptyStr),
+    qw(SimpleStr
+       NonEmptySimpleStr
+       LowerCaseSimpleStr
+       UpperCaseSimpleStr
+       Password
+       StrongPassword
+       NonEmptyStr
+       LowerCaseStr
+       UpperCaseStr),
   );
 
-  has simplestr => ( is => 'rw', isa => SimpleStr);
-  has nestr => ( is => 'rw', isa => NonEmptyStr);
-  has nesimplestr => ( is => 'rw', isa => NonEmptySimpleStr);
-  has password => ( is => 'rw', isa => Password);
-  has strongpassword => ( is => 'rw', isa => StrongPassword);
+  has simplestr => ( is => 'rw', isa => SimpleStr );
+  has nestr => ( is => 'rw', isa => NonEmptyStr );
+  has nesimplestr => ( is => 'rw', isa => NonEmptySimpleStr );
+  has lcsimplestr => ( is => 'rw', isa => LowerCaseSimpleStr );
+  has ucsimplestr => ( is => 'rw', isa => UpperCaseSimpleStr );
+  has password => ( is => 'rw', isa => Password );
+  has strongpassword => ( is => 'rw', isa => StrongPassword );
+  has lowercasestr => ( is => 'rw', isa => LowerCaseStr );
+  has uppercasestr => ( is => 'rw', isa => UpperCaseStr );
 }
 
 my $ins = FooTest->new;
 
-lives_ok { $ins->simplestr('') } 'SimpleStr';
-lives_ok { $ins->simplestr('good string') } 'SimpleStr 2';
-dies_ok { $ins->simplestr("bad\nstring") } 'SimpleStr 3';
-dies_ok { $ins->simplestr(join('', ("long string" x 25))) } 'SimpleStr 4';
-
-dies_ok { $ins->nestr('') } 'NonEmptyStr';
-lives_ok { $ins->nestr('good string') } 'NonEmptyStr 2';
-lives_ok { $ins->nestr("bad\nstring") } 'NonEmptyStr 3';
-lives_ok { $ins->nestr(join('', ("long string" x 25))) } 'NonEmptyStr 4';
+is(exception { $ins->simplestr('') }, undef, 'SimpleStr');
+is(exception { $ins->simplestr('good string') }, undef, 'SimpleStr 2');
+isnt(exception { $ins->simplestr("bad\nstring") }, 'SimpleStr 3');
+isnt(exception { $ins->simplestr(join('', ("long string" x 25))) }, undef, 
'SimpleStr 4');
 
-lives_ok { $ins->nesimplestr('good str') } 'NonEmptySimplrStr ';
-dies_ok { $ins->nesimplestr('') } 'NonEmptyStr 2';
+isnt(exception { $ins->nestr('') }, undef, 'NonEmptyStr');
+is(exception { $ins->nestr('good string') }, undef, 'NonEmptyStr 2');
+is(exception { $ins->nestr("bad\nstring") }, undef, 'NonEmptyStr 3');
+is(exception { $ins->nestr(join('', ("long string" x 25))) }, undef, 
'NonEmptyStr 4');
 
-dies_ok { $ins->password('no') } 'Password';
-lives_ok { $ins->password('okay') } 'Password 2';
+is(exception { $ins->nesimplestr('good str') }, undef, 'NonEmptySimplrStr');
+isnt(exception { $ins->nesimplestr('') }, undef, 'NonEmptyStr 2');
 
-dies_ok { $ins->strongpassword('notokay') } 'StrongPassword';
-lives_ok { $ins->strongpassword('83773r_ch01c3') } 'StrongPassword 2';
+isnt(exception { $ins->password('no') }, undef, 'Password');
+is(exception { $ins->password('okay') }, undef, 'Password 2');
+
+isnt(exception { $ins->strongpassword('notokay') }, undef, 'StrongPassword');
+is(exception { $ins->strongpassword('83773r_ch01c3') }, undef, 'StrongPassword 
2');
+
+isnt(exception { $ins->lcsimplestr('NOTOK') }, undef, 'LowerCaseSimpleStr');
+is(exception { $ins->lcsimplestr('ok') }, undef, 'LowerCaseSimpleStr 2');
+
+isnt(exception { $ins->ucsimplestr('notok') }, undef, 'UpperCaseSimpleStr');
+is(exception { $ins->ucsimplestr('OK') }, undef, 'UpperCaseSimpleStr 2');
+
+isnt(exception { $ins->lowercasestr('NOTOK') }, undef, 'LowerCaseStr');
+is(exception { $ins->lowercasestr('ok') }, undef, 'LowerCaseStr 2');
+
+isnt(exception { $ins->uppercasestr('notok') }, undef, 'UpperCaseStr');
+is(exception { $ins->uppercasestr('OK') }, undef, 'UpperCaseStr 2');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MooseX-Types-Common-0.001003/t/02-numeric.t 
new/MooseX-Types-Common-0.001004/t/02-numeric.t
--- old/MooseX-Types-Common-0.001003/t/02-numeric.t     2011-08-31 
17:34:31.000000000 +0200
+++ new/MooseX-Types-Common-0.001004/t/02-numeric.t     2011-12-06 
04:18:00.000000000 +0100
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 use Test::More tests => 34;
-use Test::Exception;
+use Test::Fatal;
 
 {
   package FooTest;
@@ -29,41 +29,41 @@
 
 my $ins = FooTest->new;
 
-dies_ok { $ins->digit(100); } 'SingleDigit';
-lives_ok { $ins->digit(1); } 'SingleDigit 2';
+isnt(exception { $ins->digit(100); }, undef, 'SingleDigit');
+is(exception { $ins->digit(1); }, undef, 'SingleDigit 2');
 
-dies_ok { $ins->posint(-100); } 'PositiveInt (-100)';
-dies_ok { $ins->posint(0); } 'PositiveInt (0)';
-dies_ok { $ins->posint(100.885); } 'PositiveInt (100.885)';
-lives_ok { $ins->posint(100); } 'PositiveInt (100)';
-dies_ok { $ins->posnum(0); } 'PositiveNum (0)';
-lives_ok { $ins->posnum(100.885); } 'PositiveNum (100.885)';
-dies_ok { $ins->posnum(-100.885); } 'PositiveNum (-100.885)';
-lives_ok { $ins->posnum(0.0000000001); } 'PositiveNum (0.0000000001)';
-
-dies_ok { $ins->posorzeroint(-100); } 'PositiveOrZeroInt (-100)';
-lives_ok { $ins->posorzeroint(0); } 'PositiveOrZeroInt (0)';
-dies_ok { $ins->posorzeroint(100.885); } 'PositiveOrZeroInt (100.885)';
-lives_ok { $ins->posorzeroint(100); } 'PositiveOrZeroInt (100)';
-lives_ok { $ins->posorzeronum(0); } 'PositiveOrZeroNum (0)';
-lives_ok { $ins->posorzeronum(100.885); } 'PositiveOrZeroNum (100.885)';
-dies_ok { $ins->posorzeronum(-100.885); } 'PositiveOrZeroNum (-100.885)';
-lives_ok { $ins->posorzeronum(0.0000000001); } 'PositiveOrZeroNum 
(0.0000000001)';
-
-dies_ok { $ins->negint(100); } 'NegativeInt (100)';
-dies_ok { $ins->negint(-100.885); } 'NegativeInt (-100.885)';
-lives_ok { $ins->negint(-100); } 'NegativeInt (-100)';
-dies_ok { $ins->negint(0); } 'NegativeInt (0)';
-lives_ok { $ins->negnum(-100.885); } 'NegativeNum (-100.885)';
-dies_ok { $ins->negnum(100.885); } 'NegativeNum (100.885)';
-dies_ok { $ins->negnum(0); } 'NegativeNum (0)';
-lives_ok { $ins->negnum(-0.0000000001); } 'NegativeNum (-0.0000000001)';
-
-dies_ok { $ins->negorzeroint(100); } 'NegativeOrZeroInt (100)';
-dies_ok { $ins->negorzeroint(-100.885); } 'NegativeOrZeroInt (-100.885)';
-lives_ok { $ins->negorzeroint(-100); } 'NegativeOrZeroInt (-100)';
-lives_ok { $ins->negorzeroint(0); } 'NegativeOrZeroInt (0)';
-lives_ok { $ins->negorzeronum(-100.885); } 'NegativeOrZeroNum (-100.885)';
-dies_ok { $ins->negorzeronum(100.885); } 'NegativeOrZeroNum (100.885)';
-lives_ok { $ins->negorzeronum(0); } 'NegativeOrZeroNum (0)';
-lives_ok { $ins->negorzeronum(-0.0000000001); } 'NegativeOrZeroNum 
(-0.0000000001)';
+isnt(exception { $ins->posint(-100); }, undef, 'PositiveInt (-100)');
+isnt(exception { $ins->posint(0); }, undef, 'PositiveInt (0)');
+isnt(exception { $ins->posint(100.885); }, undef, 'PositiveInt (100.885)');
+is(exception { $ins->posint(100); }, undef, 'PositiveInt (100)');
+isnt(exception { $ins->posnum(0); }, undef, 'PositiveNum (0)');
+is(exception { $ins->posnum(100.885); }, undef, 'PositiveNum (100.885)');
+isnt(exception { $ins->posnum(-100.885); }, undef, 'PositiveNum (-100.885)');
+is(exception { $ins->posnum(0.0000000001); }, undef, 'PositiveNum 
(0.0000000001)');
+
+isnt(exception { $ins->posorzeroint(-100); }, undef, 'PositiveOrZeroInt 
(-100)');
+is(exception { $ins->posorzeroint(0); }, undef, 'PositiveOrZeroInt (0)');
+isnt(exception { $ins->posorzeroint(100.885); }, undef, 'PositiveOrZeroInt 
(100.885)');
+is(exception { $ins->posorzeroint(100); }, undef, 'PositiveOrZeroInt (100)');
+is(exception { $ins->posorzeronum(0); }, undef, 'PositiveOrZeroNum (0)');
+is(exception { $ins->posorzeronum(100.885); }, undef, 'PositiveOrZeroNum 
(100.885)');
+isnt(exception { $ins->posorzeronum(-100.885); }, undef, 'PositiveOrZeroNum 
(-100.885)');
+is(exception { $ins->posorzeronum(0.0000000001); }, undef, 'PositiveOrZeroNum 
(0.0000000001)');
+
+isnt(exception { $ins->negint(100); }, undef, 'NegativeInt (100)');
+isnt(exception { $ins->negint(-100.885); }, undef, 'NegativeInt (-100.885)');
+is(exception { $ins->negint(-100); }, undef, 'NegativeInt (-100)');
+isnt(exception { $ins->negint(0); }, undef, 'NegativeInt (0)');
+is(exception { $ins->negnum(-100.885); }, undef, 'NegativeNum (-100.885)');
+isnt(exception { $ins->negnum(100.885); }, undef, 'NegativeNum (100.885)');
+isnt(exception { $ins->negnum(0); }, undef, 'NegativeNum (0)');
+is(exception { $ins->negnum(-0.0000000001); }, undef, 'NegativeNum 
(-0.0000000001)');
+
+isnt(exception { $ins->negorzeroint(100); }, undef, 'NegativeOrZeroInt (100)');
+isnt(exception { $ins->negorzeroint(-100.885); }, undef, 'NegativeOrZeroInt 
(-100.885)');
+is(exception { $ins->negorzeroint(-100); }, undef, 'NegativeOrZeroInt (-100)');
+is(exception { $ins->negorzeroint(0); }, undef, 'NegativeOrZeroInt (0)');
+is(exception { $ins->negorzeronum(-100.885); }, undef, 'NegativeOrZeroNum 
(-100.885)');
+isnt(exception { $ins->negorzeronum(100.885); }, undef, 'NegativeOrZeroNum 
(100.885)');
+is(exception { $ins->negorzeronum(0); }, undef, 'NegativeOrZeroNum (0)');
+is(exception { $ins->negorzeronum(-0.0000000001); }, undef, 'NegativeOrZeroNum 
(-0.0000000001)');
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/MooseX-Types-Common-0.001003/t/04-coerce.t 
new/MooseX-Types-Common-0.001004/t/04-coerce.t
--- old/MooseX-Types-Common-0.001003/t/04-coerce.t      1970-01-01 
01:00:00.000000000 +0100
+++ new/MooseX-Types-Common-0.001004/t/04-coerce.t      2011-12-06 
05:19:07.000000000 +0100
@@ -0,0 +1,29 @@
+#! /usr/bin/perl -w
+
+use strict;
+use warnings;
+use Test::More tests => 4;
+
+{
+  package FooTest;
+  use Moose;
+  use MooseX::Types::Common::String ( qw( LowerCaseSimpleStr 
UpperCaseSimpleStr LowerCaseStr UpperCaseStr) );
+
+  has uppercasesimplestr => ( is => 'rw', isa => UpperCaseSimpleStr, coerce => 
1 );
+  has lowercasesimplestr => ( is => 'rw', isa => LowerCaseSimpleStr, coerce => 
1 );
+  has uppercasestr => ( is => 'rw', isa => UpperCaseStr, coerce => 1 );
+  has lowercasestr => ( is => 'rw', isa => LowerCaseStr, coerce => 1 );
+}
+
+my $ins = FooTest->new({
+  uppercasesimplestr => 'foo',
+  lowercasesimplestr => 'BAR',
+  uppercasestr => 'foo',
+  lowercasestr => 'BAR',
+});
+
+is( $ins->uppercasesimplestr, 'FOO', 'uppercase str' );
+is( $ins->lowercasesimplestr, 'bar', 'lowercase str' );
+
+is( $ins->uppercasestr, 'FOO', 'uppercase str' );
+is( $ins->lowercasestr, 'bar', 'lowercase str' );

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to