r54079 - in /branches/upstream/libmoosex-storage-perl/current: ./ inc/Module/Install/ lib/MooseX/ lib/MooseX/Storage/ lib/MooseX/Storage/Base/ lib/MooseX/Storage/Engine/IO/ lib/MooseX/Storage/Format/ lib/MooseX/Storage/IO/ lib/MooseX/Storage/Meta/Attribute/ lib/MooseX/Storage/Meta/Attribute/Trait/ lib/MooseX/Storage/Traits/ t/

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Thu Mar 11 02:46:14 UTC 2010


Author: jawnsy-guest
Date: Thu Mar 11 02:46:09 2010
New Revision: 54079

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

Modified:
    branches/upstream/libmoosex-storage-perl/current/Changes
    branches/upstream/libmoosex-storage-perl/current/META.yml
    branches/upstream/libmoosex-storage-perl/current/Makefile.PL
    branches/upstream/libmoosex-storage-perl/current/README
    branches/upstream/libmoosex-storage-perl/current/inc/Module/Install/Base.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Base/WithChecksum.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Basic.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Deferred.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Engine.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Engine/IO/AtomicFile.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Engine/IO/File.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Format/JSON.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Format/Storable.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Format/YAML.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/IO/AtomicFile.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/IO/File.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/IO/StorableFile.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Traits/DisableCycleDetection.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Traits/OnlyWhenBuilt.pm
    branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Util.pm
    branches/upstream/libmoosex-storage-perl/current/t/001_basic.t

Modified: branches/upstream/libmoosex-storage-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/Changes?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/Changes (original)
+++ branches/upstream/libmoosex-storage-perl/current/Changes Thu Mar 11 02:46:09 2010
@@ -1,4 +1,7 @@
 Revision history for MooseX-Storage
+
+0.25
+  * Add support for Union types (bumps Moose dep to 0.99)
 
 0.24
   * Add additional YAML implementation tests.

Modified: branches/upstream/libmoosex-storage-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/META.yml?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/META.yml (original)
+++ branches/upstream/libmoosex-storage-perl/current/META.yml Thu Mar 11 02:46:09 2010
@@ -22,9 +22,9 @@
     - inc
     - t
 requires:
-  Moose: 0.87
+  Moose: 0.99
   String::RewritePrefix: 0
 resources:
   license: http://dev.perl.org/licenses/
   repository: git://git.moose.perl.org/gitmo/MooseX-Storage.git
-version: 0.24
+version: 0.25

Modified: branches/upstream/libmoosex-storage-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/Makefile.PL?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/Makefile.PL (original)
+++ branches/upstream/libmoosex-storage-perl/current/Makefile.PL Thu Mar 11 02:46:09 2010
@@ -8,7 +8,7 @@
 all_from 'lib/MooseX/Storage.pm';
 
 # Specific dependencies
-requires 'Moose' => '0.87';
+requires 'Moose' => '0.99';
 requires 'String::RewritePrefix';
 
 author_requires 'Test::Without::Module';

Modified: branches/upstream/libmoosex-storage-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/README?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/README (original)
+++ branches/upstream/libmoosex-storage-perl/current/README Thu Mar 11 02:46:09 2010
@@ -1,4 +1,4 @@
-MooseX-Storage version 0.24
+MooseX-Storage version 0.25
 
 INSTALLATION
 

Modified: branches/upstream/libmoosex-storage-perl/current/inc/Module/Install/Base.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/inc/Module/Install/Base.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/inc/Module/Install/Base.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/inc/Module/Install/Base.pm Thu Mar 11 02:46:09 2010
@@ -9,8 +9,8 @@
 
 # Suspend handler for "redefined" warnings
 BEGIN {
-	my $w = $SIG{__WARN__};
-	$SIG{__WARN__} = sub { $w };
+#	my $w = $SIG{__WARN__};
+#	$SIG{__WARN__} = sub { $w };
 }
 
 #line 42
@@ -70,7 +70,7 @@
 
 # Restore warning handler
 BEGIN {
-	$SIG{__WARN__} = $SIG{__WARN__}->();
+#	$SIG{__WARN__} = $SIG{__WARN__}->();
 }
 
 1;

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage.pm Thu Mar 11 02:46:09 2010
@@ -5,7 +5,7 @@
 use MooseX::Storage::Meta::Attribute::DoNotSerialize;
 use String::RewritePrefix ();
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 sub import {

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Base/WithChecksum.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Base/WithChecksum.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Base/WithChecksum.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Base/WithChecksum.pm Thu Mar 11 02:46:09 2010
@@ -6,7 +6,7 @@
 use Digest       ();
 use Data::Dumper ();
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 our $DIGEST_MARKER = '__DIGEST__';

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Basic.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Basic.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Basic.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Basic.pm Thu Mar 11 02:46:09 2010
@@ -3,7 +3,7 @@
 
 use MooseX::Storage::Engine;
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 sub pack {

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Deferred.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Deferred.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Deferred.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Deferred.pm Thu Mar 11 02:46:09 2010
@@ -1,7 +1,7 @@
 package MooseX::Storage::Deferred;
 use Moose::Role;
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 with 'MooseX::Storage::Basic';

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Engine.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Engine.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Engine.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Engine.pm Thu Mar 11 02:46:09 2010
@@ -3,7 +3,7 @@
 use Moose;
 use Scalar::Util qw(refaddr);
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 # the class marker when
@@ -82,7 +82,7 @@
         if ref $value;
 
     if (defined $value && $attr->has_type_constraint) {
-        my $type_converter = $self->find_type_handler($attr->type_constraint);
+        my $type_converter = $self->find_type_handler($attr->type_constraint, $value);
         (defined $type_converter)
             || confess "Cannot convert " . $attr->type_constraint->name;
         $value = $type_converter->{collapse}->($value, $options);
@@ -103,7 +103,7 @@
     }
    
     if (defined $value && $attr->has_type_constraint) {
-        my $type_converter = $self->find_type_handler($attr->type_constraint);
+        my $type_converter = $self->find_type_handler($attr->type_constraint, $value);
         $value = $type_converter->{expand}->($value, $options);
     }
 	return $value;
@@ -300,15 +300,23 @@
 }
 
 sub find_type_handler {
-    my ($self, $type_constraint) = @_;
-   
+    my ($self, $type_constraint, $value) = @_;
+
     # check if the type is a Maybe and
     # if its parent is not parameterized.
     # If both is true recurse this method
     # using ->type_parameter.
-    return $self->find_type_handler($type_constraint->type_parameter)
+    return $self->find_type_handler($type_constraint->type_parameter, $value)
         if ($type_constraint->parent && $type_constraint->parent eq 'Maybe'
           and not $type_constraint->parent->can('type_parameter'));
+
+    # find_type_for is a method of a union type.  If we can call that method
+    # then we are dealign with a union and we need to ascertain which of
+    # the union's types we need to use for the value we are serializing.
+    if($type_constraint->can('find_type_for')) {
+        my $tc = $type_constraint->find_type_for($value);
+        return $self->find_type_handler($tc, $value) if defined($tc);
+    }
 
     # this should handle most type usages
     # since they they are usually just

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Engine/IO/AtomicFile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Engine/IO/AtomicFile.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Engine/IO/AtomicFile.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Engine/IO/AtomicFile.pm Thu Mar 11 02:46:09 2010
@@ -5,7 +5,7 @@
 use utf8 ();
 use IO::AtomicFile;
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 extends 'MooseX::Storage::Engine::IO::File';

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Engine/IO/File.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Engine/IO/File.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Engine/IO/File.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Engine/IO/File.pm Thu Mar 11 02:46:09 2010
@@ -5,7 +5,7 @@
 use utf8 ();
 use IO::File;
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 has 'file' => (

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Format/JSON.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Format/JSON.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Format/JSON.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Format/JSON.pm Thu Mar 11 02:46:09 2010
@@ -7,7 +7,7 @@
 use JSON::Any;
 use utf8 ();
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 requires 'pack';

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Format/Storable.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Format/Storable.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Format/Storable.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Format/Storable.pm Thu Mar 11 02:46:09 2010
@@ -4,7 +4,7 @@
 
 use Storable ();
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 requires 'pack';

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Format/YAML.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Format/YAML.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Format/YAML.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Format/YAML.pm Thu Mar 11 02:46:09 2010
@@ -7,7 +7,7 @@
 
 use YAML::Any qw(Load Dump);
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 requires 'pack';

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/IO/AtomicFile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/IO/AtomicFile.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/IO/AtomicFile.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/IO/AtomicFile.pm Thu Mar 11 02:46:09 2010
@@ -3,7 +3,7 @@
 
 use MooseX::Storage::Engine::IO::AtomicFile;
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 with 'MooseX::Storage::IO::File';

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/IO/File.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/IO/File.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/IO/File.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/IO/File.pm Thu Mar 11 02:46:09 2010
@@ -3,7 +3,7 @@
 
 use MooseX::Storage::Engine::IO::File;
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 requires 'thaw';

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/IO/StorableFile.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/IO/StorableFile.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/IO/StorableFile.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/IO/StorableFile.pm Thu Mar 11 02:46:09 2010
@@ -3,7 +3,7 @@
 
 use Storable ();
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 requires 'pack';

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Meta/Attribute/DoNotSerialize.pm Thu Mar 11 02:46:09 2010
@@ -2,7 +2,7 @@
 package MooseX::Storage::Meta::Attribute::DoNotSerialize;
 use Moose;
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 extends 'Moose::Meta::Attribute';
@@ -11,7 +11,7 @@
 # register this alias ...
 package Moose::Meta::Attribute::Custom::DoNotSerialize;
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 sub register_implementation { 'MooseX::Storage::Meta::Attribute::DoNotSerialize' }

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Meta/Attribute/Trait/DoNotSerialize.pm Thu Mar 11 02:46:09 2010
@@ -2,13 +2,13 @@
 package MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize;
 use Moose::Role;
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 # register this alias ...
 package Moose::Meta::Attribute::Custom::Trait::DoNotSerialize;
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 sub register_implementation { 'MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize' }

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Traits/DisableCycleDetection.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Traits/DisableCycleDetection.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Traits/DisableCycleDetection.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Traits/DisableCycleDetection.pm Thu Mar 11 02:46:09 2010
@@ -1,7 +1,7 @@
 package MooseX::Storage::Traits::DisableCycleDetection;
 use Moose::Role;
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 requires 'pack';

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Traits/OnlyWhenBuilt.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Traits/OnlyWhenBuilt.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Traits/OnlyWhenBuilt.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Traits/OnlyWhenBuilt.pm Thu Mar 11 02:46:09 2010
@@ -1,7 +1,7 @@
 package MooseX::Storage::Traits::OnlyWhenBuilt;
 use Moose::Role;
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 requires 'pack';

Modified: branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Util.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Util.pm?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Util.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage/Util.pm Thu Mar 11 02:46:09 2010
@@ -4,7 +4,7 @@
 use MooseX::Storage::Engine ();
 use utf8 ();
 
-our $VERSION   = '0.24';
+our $VERSION   = '0.25';
 our $AUTHORITY = 'cpan:STEVAN';
 
 sub peek {

Modified: branches/upstream/libmoosex-storage-perl/current/t/001_basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/t/001_basic.t?rev=54079&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/t/001_basic.t (original)
+++ branches/upstream/libmoosex-storage-perl/current/t/001_basic.t Thu Mar 11 02:46:09 2010
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 12;
+use Test::More tests => 14;
 
 BEGIN {
     use_ok('MooseX::Storage');
@@ -24,6 +24,8 @@
     has 'array'   => ( is => 'ro', isa => 'ArrayRef' );
     has 'hash'    => ( is => 'ro', isa => 'HashRef' );
     has 'object'  => ( is => 'ro', isa => 'Foo' );
+    has 'union'   => ( is => 'ro', isa => 'ArrayRef|Str' );
+    has 'union2'   => ( is => 'ro', isa => 'ArrayRef|Str' );
 }
 
 {
@@ -35,9 +37,11 @@
         array   => [ 1 .. 10 ],
         hash    => { map { $_ => undef } ( 1 .. 10 ) },
         object  => Foo->new( number => 2 ),
+        union   => [ 1, 2, 3 ],
+        union2  => 'A String'
     );
     isa_ok( $foo, 'Foo' );
-    
+
     is_deeply(
         $foo->pack,
         {
@@ -48,10 +52,12 @@
             float     => 10.5,
             array     => [ 1 .. 10 ],
             hash      => { map { $_ => undef } ( 1 .. 10 ) },
-            object    => { 
-                            __CLASS__ => 'Foo',                
-                            number    => 2 
-                         },            
+            object    => {
+                            __CLASS__ => 'Foo',
+                            number    => 2
+                         },
+            union     => [ 1, 2, 3 ],
+            union2    => 'A String'
         },
         '... got the right frozen class'
     );
@@ -67,11 +73,13 @@
             float     => 10.5,
             array     => [ 1 .. 10 ],
             hash      => { map { $_ => undef } ( 1 .. 10 ) },
-            object    => { 
-                            __CLASS__ => 'Foo',                
-                            number    => 2 
-                         },            
-        }        
+            object    => {
+                            __CLASS__ => 'Foo',
+                            number    => 2
+                         },
+            union     => [ 1, 2, 3 ],
+            union2    => 'A String'
+        }
     );
     isa_ok( $foo, 'Foo' );
 
@@ -89,4 +97,6 @@
     isa_ok( $foo->object, 'Foo' );
     is( $foo->object->number, 2,
         '... got the right number (in the embedded object)' );
+    is_deeply( $foo->union, [ 1 .. 3 ], '... got the right array (in the union)' );
+    is( $foo->union2,  'A String',  '... got the right string (in the union)' );
 }




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