r50681 - in /branches/upstream/libmoosex-storage-perl/current: ./ 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
Mon Jan 11 02:06:36 UTC 2010


Author: jawnsy-guest
Date: Mon Jan 11 02:06:30 2010
New Revision: 50681

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

Added:
    branches/upstream/libmoosex-storage-perl/current/t/020_basic_yaml_syck.t
    branches/upstream/libmoosex-storage-perl/current/t/020_basic_yaml_xs.t
Modified:
    branches/upstream/libmoosex-storage-perl/current/Changes
    branches/upstream/libmoosex-storage-perl/current/MANIFEST
    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/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/020_basic_yaml.t
    branches/upstream/libmoosex-storage-perl/current/t/060_basic_deferred.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=50681&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/Changes (original)
+++ branches/upstream/libmoosex-storage-perl/current/Changes Mon Jan 11 02:06:30 2010
@@ -1,4 +1,9 @@
 Revision history for MooseX-Storage
+
+0.24
+  * Add additional YAML implementation tests.
+  * Switch from using Best to YAML::Any.
+  * Remove Test::YAML::Valid.
 
 0.23
   * Revert whitespace change in tests which breaks the tests if you

Modified: branches/upstream/libmoosex-storage-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/MANIFEST?rev=50681&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/MANIFEST (original)
+++ branches/upstream/libmoosex-storage-perl/current/MANIFEST Mon Jan 11 02:06:30 2010
@@ -48,6 +48,8 @@
 t/011_basic_json_w_utf8.t
 t/012_param_json.t
 t/020_basic_yaml.t
+t/020_basic_yaml_syck.t
+t/020_basic_yaml_xs.t
 t/030_with_checksum.t
 t/040_basic_utils.t
 t/050_basic_storable.t

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=50681&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/META.yml (original)
+++ branches/upstream/libmoosex-storage-perl/current/META.yml Mon Jan 11 02:06:30 2010
@@ -27,4 +27,4 @@
 resources:
   license: http://dev.perl.org/licenses/
   repository: git://git.moose.perl.org/gitmo/MooseX-Storage.git
-version: 0.23
+version: 0.24

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=50681&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/Makefile.PL (original)
+++ branches/upstream/libmoosex-storage-perl/current/Makefile.PL Mon Jan 11 02:06:30 2010
@@ -11,27 +11,33 @@
 requires 'Moose' => '0.87';
 requires 'String::RewritePrefix';
 
+author_requires 'Test::Without::Module';
+
 # you should have at least one
 # serialization format
 feature 'JSON',
   -default     => 1,
   'JSON::Any'  => '1.15',
   'Test::JSON' => '0.06';
+author_requires 'JSON::Any'  => '1.15';
+author_requires 'Test::JSON' => '0.06';
 
 feature 'YAML',
   -default            => 1,
-  'Best'              => '0.1',
-  'Test::YAML::Valid' => '0';
+  'YAML::Any'         => '0';
+author_requires 'YAML::Any';
 
 feature 'Storable',
   -default   => 1,
   'Storable' => '0';
+author_requires 'Storable';
 
 # and the ability to save the
 # file to disk
 feature 'File',
   -default   => 1,
   'IO::File' => '0.1';
+author_requires 'IO::File' => '0.1';
 
 author_tests 't/author';
 

Modified: branches/upstream/libmoosex-storage-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/README?rev=50681&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/README (original)
+++ branches/upstream/libmoosex-storage-perl/current/README Mon Jan 11 02:06:30 2010
@@ -1,4 +1,4 @@
-MooseX-Storage version 0.23
+MooseX-Storage version 0.24
 
 INSTALLATION
 

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=50681&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage.pm (original)
+++ branches/upstream/libmoosex-storage-perl/current/lib/MooseX/Storage.pm Mon Jan 11 02:06:30 2010
@@ -5,7 +5,7 @@
 use MooseX::Storage::Meta::Attribute::DoNotSerialize;
 use String::RewritePrefix ();
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -6,7 +6,7 @@
 use Digest       ();
 use Data::Dumper ();
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -3,7 +3,7 @@
 
 use MooseX::Storage::Engine;
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -1,7 +1,7 @@
 package MooseX::Storage::Deferred;
 use Moose::Role;
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -3,7 +3,7 @@
 use Moose;
 use Scalar::Util qw(refaddr);
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 our $AUTHORITY = 'cpan:STEVAN';
 
 # the class marker when

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=50681&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 Mon Jan 11 02:06:30 2010
@@ -5,7 +5,7 @@
 use utf8 ();
 use IO::AtomicFile;
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -5,7 +5,7 @@
 use utf8 ();
 use IO::File;
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -7,7 +7,7 @@
 use JSON::Any;
 use utf8 ();
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -4,7 +4,7 @@
 
 use Storable ();
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -5,12 +5,9 @@
 # Tests break because tye YAML is invalid...?
 # -dcp
 
-use Best [
-    [ qw[YAML::Syck YAML] ],
-    [ qw[Load Dump] ]
-];
+use YAML::Any qw(Load Dump);
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -3,7 +3,7 @@
 
 use MooseX::Storage::Engine::IO::AtomicFile;
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -3,7 +3,7 @@
 
 use MooseX::Storage::Engine::IO::File;
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -3,7 +3,7 @@
 
 use Storable ();
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -2,7 +2,7 @@
 package MooseX::Storage::Meta::Attribute::DoNotSerialize;
 use Moose;
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 our $AUTHORITY = 'cpan:STEVAN';
 
 extends 'Moose::Meta::Attribute';
@@ -11,7 +11,7 @@
 # register this alias ...
 package Moose::Meta::Attribute::Custom::DoNotSerialize;
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -2,13 +2,13 @@
 package MooseX::Storage::Meta::Attribute::Trait::DoNotSerialize;
 use Moose::Role;
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 our $AUTHORITY = 'cpan:STEVAN';
 
 # register this alias ...
 package Moose::Meta::Attribute::Custom::Trait::DoNotSerialize;
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -1,7 +1,7 @@
 package MooseX::Storage::Traits::DisableCycleDetection;
 use Moose::Role;
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -1,7 +1,7 @@
 package MooseX::Storage::Traits::OnlyWhenBuilt;
 use Moose::Role;
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 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=50681&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 Mon Jan 11 02:06:30 2010
@@ -4,7 +4,7 @@
 use MooseX::Storage::Engine ();
 use utf8 ();
 
-our $VERSION   = '0.23';
+our $VERSION   = '0.24';
 our $AUTHORITY = 'cpan:STEVAN';
 
 sub peek {

Modified: branches/upstream/libmoosex-storage-perl/current/t/020_basic_yaml.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/t/020_basic_yaml.t?rev=50681&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/t/020_basic_yaml.t (original)
+++ branches/upstream/libmoosex-storage-perl/current/t/020_basic_yaml.t Mon Jan 11 02:06:30 2010
@@ -6,11 +6,15 @@
 use Test::More;
 
 BEGIN {
-    eval "use Test::YAML::Valid";
-    plan skip_all => "Test::YAML::Valid is required for this test" if $@;            
-    eval "use Best [[qw(YAML::Syck YAML)]]";
-    plan skip_all => "YAML or YAML::syck and Best are required for this test" if $@;            
-    plan tests => 12;
+    eval "use YAML::Any";
+    plan skip_all => "YAML::Any is required for this test" if $@;
+    eval "require YAML";
+    plan skip_all => "YAML is required for this test" if $@;
+    eval "require Test::Without::Module";
+    plan skip_all => "Test::Without::Module is required for this test" if $@;
+    Test::Without::Module->import(YAML::Any->order);
+    Test::Without::Module->unimport('YAML');
+    plan tests => 10;
     use_ok('MooseX::Storage');
 }
 
@@ -43,94 +47,21 @@
 
     my $yaml = $foo->freeze;
 
-    yaml_string_ok( $yaml, '... we got valid YAML out of it' );
+    my $bar = Foo->thaw( $yaml );
+    isa_ok( $bar, 'Foo' );
 
-    is(
-        $yaml,
-        q{--- 
-__CLASS__: Foo
-array: 
-  - 1
-  - 2
-  - 3
-  - 4
-  - 5
-  - 6
-  - 7
-  - 8
-  - 9
-  - 10
-float: 10.5
-hash: 
-  1: ~
-  10: ~
-  2: ~
-  3: ~
-  4: ~
-  5: ~
-  6: ~
-  7: ~
-  8: ~
-  9: ~
-number: 10
-object: 
-  __CLASS__: Foo
-  number: 2
-string: foo
-},
-        '... got the same YAML'
-    );
-
-}
-
-{
-    my $foo = Foo->thaw(
-        q{--- 
-__CLASS__: Foo
-array: 
-  - 1
-  - 2
-  - 3
-  - 4
-  - 5
-  - 6
-  - 7
-  - 8
-  - 9
-  - 10
-float: 10.5
-hash: 
-  1: ~
-  10: ~
-  2: ~
-  3: ~
-  4: ~
-  5: ~
-  6: ~
-  7: ~
-  8: ~
-  9: ~
-number: 10
-object: 
-  __CLASS__: Foo
-  number: 2
-string: foo
-}
-    );
-    isa_ok( $foo, 'Foo' );
-
-    is( $foo->number, 10,    '... got the right number' );
-    is( $foo->string, 'foo', '... got the right string' );
-    is( $foo->float,  10.5,  '... got the right float' );
-    is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' );
+    is( $bar->number, 10,    '... got the right number' );
+    is( $bar->string, 'foo', '... got the right string' );
+    is( $bar->float,  10.5,  '... got the right float' );
+    is_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' );
     is_deeply(
-        $foo->hash,
+        $bar->hash,
         { map { $_ => undef } ( 1 .. 10 ) },
         '... got the right hash'
     );
 
-    isa_ok( $foo->object, 'Foo' );
-    is( $foo->object->number, 2,
+    isa_ok( $bar->object, 'Foo' );
+    is( $bar->object->number, 2,
         '... got the right number (in the embedded object)' );
 }
 

Added: branches/upstream/libmoosex-storage-perl/current/t/020_basic_yaml_syck.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/t/020_basic_yaml_syck.t?rev=50681&op=file
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/t/020_basic_yaml_syck.t (added)
+++ branches/upstream/libmoosex-storage-perl/current/t/020_basic_yaml_syck.t Mon Jan 11 02:06:30 2010
@@ -1,0 +1,67 @@
+#!/usr/bin/perl
+$|++;
+use strict;
+use warnings;
+
+use Test::More;
+
+BEGIN {
+    eval "use YAML::Any";
+    plan skip_all => "YAML::Any is required for this test" if $@;
+    eval "require YAML::Syck";
+    plan skip_all => "YAML::Syck is required for this test" if $@;
+    eval "require Test::Without::Module";
+    plan skip_all => "Test::Without::Module is required for this test" if $@;
+    Test::Without::Module->import(YAML::Any->order);
+    Test::Without::Module->unimport('YAML::Syck');
+    plan tests => 10;
+    use_ok('MooseX::Storage');
+}
+
+{
+
+    package Foo;
+    use Moose;
+    use MooseX::Storage;
+
+    with Storage( 'format' => 'YAML' );
+
+    has 'number' => ( is => 'ro', isa => 'Int' );
+    has 'string' => ( is => 'ro', isa => 'Str' );
+    has 'float'  => ( is => 'ro', isa => 'Num' );
+    has 'array'  => ( is => 'ro', isa => 'ArrayRef' );
+    has 'hash'   => ( is => 'ro', isa => 'HashRef' );
+    has 'object' => ( is => 'ro', isa => 'Object' );
+}
+
+{
+    my $foo = Foo->new(
+        number => 10,
+        string => 'foo',
+        float  => 10.5,
+        array  => [ 1 .. 10 ],
+        hash   => { map { $_ => undef } ( 1 .. 10 ) },
+        object => Foo->new( number => 2 ),
+    );
+    isa_ok( $foo, 'Foo' );
+
+    my $yaml = $foo->freeze;
+
+    my $bar = Foo->thaw( $yaml );
+    isa_ok( $bar, 'Foo' );
+
+    is( $bar->number, 10,    '... got the right number' );
+    is( $bar->string, 'foo', '... got the right string' );
+    is( $bar->float,  10.5,  '... got the right float' );
+    is_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' );
+    is_deeply(
+        $bar->hash,
+        { map { $_ => undef } ( 1 .. 10 ) },
+        '... got the right hash'
+    );
+
+    isa_ok( $bar->object, 'Foo' );
+    is( $bar->object->number, 2,
+        '... got the right number (in the embedded object)' );
+}
+

Added: branches/upstream/libmoosex-storage-perl/current/t/020_basic_yaml_xs.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/t/020_basic_yaml_xs.t?rev=50681&op=file
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/t/020_basic_yaml_xs.t (added)
+++ branches/upstream/libmoosex-storage-perl/current/t/020_basic_yaml_xs.t Mon Jan 11 02:06:30 2010
@@ -1,0 +1,67 @@
+#!/usr/bin/perl
+$|++;
+use strict;
+use warnings;
+
+use Test::More;
+
+BEGIN {
+    eval "use YAML::Any";
+    plan skip_all => "YAML::Any is required for this test" if $@;
+    eval "require YAML::XS";
+    plan skip_all => "YAML::XS is required for this test" if $@;
+    eval "require Test::Without::Module";
+    plan skip_all => "Test::Without::Module is required for this test" if $@;
+    Test::Without::Module->import(YAML::Any->order);
+    Test::Without::Module->unimport('YAML::XS');
+    plan tests => 10;
+    use_ok('MooseX::Storage');
+}
+
+{
+
+    package Foo;
+    use Moose;
+    use MooseX::Storage;
+
+    with Storage( 'format' => 'YAML' );
+
+    has 'number' => ( is => 'ro', isa => 'Int' );
+    has 'string' => ( is => 'ro', isa => 'Str' );
+    has 'float'  => ( is => 'ro', isa => 'Num' );
+    has 'array'  => ( is => 'ro', isa => 'ArrayRef' );
+    has 'hash'   => ( is => 'ro', isa => 'HashRef' );
+    has 'object' => ( is => 'ro', isa => 'Object' );
+}
+
+{
+    my $foo = Foo->new(
+        number => 10,
+        string => 'foo',
+        float  => 10.5,
+        array  => [ 1 .. 10 ],
+        hash   => { map { $_ => undef } ( 1 .. 10 ) },
+        object => Foo->new( number => 2 ),
+    );
+    isa_ok( $foo, 'Foo' );
+
+    my $yaml = $foo->freeze;
+
+    my $bar = Foo->thaw( $yaml );
+    isa_ok( $bar, 'Foo' );
+
+    is( $bar->number, 10,    '... got the right number' );
+    is( $bar->string, 'foo', '... got the right string' );
+    is( $bar->float,  10.5,  '... got the right float' );
+    is_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' );
+    is_deeply(
+        $bar->hash,
+        { map { $_ => undef } ( 1 .. 10 ) },
+        '... got the right hash'
+    );
+
+    isa_ok( $bar->object, 'Foo' );
+    is( $bar->object->number, 2,
+        '... got the right number (in the embedded object)' );
+}
+

Modified: branches/upstream/libmoosex-storage-perl/current/t/060_basic_deferred.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmoosex-storage-perl/current/t/060_basic_deferred.t?rev=50681&op=diff
==============================================================================
--- branches/upstream/libmoosex-storage-perl/current/t/060_basic_deferred.t (original)
+++ branches/upstream/libmoosex-storage-perl/current/t/060_basic_deferred.t Mon Jan 11 02:06:30 2010
@@ -8,13 +8,17 @@
 use Storable;
 
 BEGIN {
-    eval "use Test::JSON; use Test::YAML::Valid;";
-    plan skip_all => "Test::JSON and Test::YAML::Valid are required for this test" if $@;  
+    eval "use Test::JSON";
+    plan skip_all => "Test::JSON is required for this test" if $@;
     eval "use JSON::Any";
-    plan skip_all => "JSON::Any is required for this test" if $@;          
-    plan tests => 33;    
+    plan skip_all => "JSON::Any is required for this test" if $@;
+    eval "use YAML::Any";
+    plan skip_all => "YAML::Any is required for this test" if $@;
+    plan tests => 31;
     use_ok('MooseX::Storage');
 }
+
+diag('Using implementation: ', YAML::Any->implementation);
 
 {
 
@@ -153,94 +157,21 @@
 
     my $yaml = $foo->freeze({ 'format' => 'YAML' });
 
-    yaml_string_ok( $yaml, '... we got valid YAML out of it' );
+    my $bar = Foo->thaw( $yaml, { 'format' => 'YAML' } );
+    isa_ok( $bar, 'Foo' );
 
-    is(
-        $yaml,
-        q{--- 
-__CLASS__: Foo
-array: 
-  - 1
-  - 2
-  - 3
-  - 4
-  - 5
-  - 6
-  - 7
-  - 8
-  - 9
-  - 10
-float: 10.5
-hash: 
-  1: ~
-  10: ~
-  2: ~
-  3: ~
-  4: ~
-  5: ~
-  6: ~
-  7: ~
-  8: ~
-  9: ~
-number: 10
-object: 
-  __CLASS__: Foo
-  number: 2
-string: foo
-},
-        '... got the same YAML'
-    );
-
-}
-
-{
-    my $foo = Foo->thaw(
-        q{--- 
-__CLASS__: Foo
-array: 
-  - 1
-  - 2
-  - 3
-  - 4
-  - 5
-  - 6
-  - 7
-  - 8
-  - 9
-  - 10
-float: 10.5
-hash: 
-  1: ~
-  10: ~
-  2: ~
-  3: ~
-  4: ~
-  5: ~
-  6: ~
-  7: ~
-  8: ~
-  9: ~
-number: 10
-object: 
-  __CLASS__: Foo
-  number: 2
-string: foo
-}, { 'format' => 'YAML' }
-    );
-    isa_ok( $foo, 'Foo' );
-
-    is( $foo->number, 10,    '... got the right number' );
-    is( $foo->string, 'foo', '... got the right string' );
-    is( $foo->float,  10.5,  '... got the right float' );
-    is_deeply( $foo->array, [ 1 .. 10 ], '... got the right array' );
+    is( $bar->number, 10,    '... got the right number' );
+    is( $bar->string, 'foo', '... got the right string' );
+    is( $bar->float,  10.5,  '... got the right float' );
+    is_deeply( $bar->array, [ 1 .. 10 ], '... got the right array' );
     is_deeply(
-        $foo->hash,
+        $bar->hash,
         { map { $_ => undef } ( 1 .. 10 ) },
         '... got the right hash'
     );
 
-    isa_ok( $foo->object, 'Foo' );
-    is( $foo->object->number, 2,
+    isa_ok( $bar->object, 'Foo' );
+    is( $bar->object->number, 2,
         '... got the right number (in the embedded object)' );
 }
 




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