From: John Napiorkowski Date: Wed, 2 Mar 2011 22:36:41 +0000 (-0500) Subject: fixed problems with new features in last release X-Git-Tag: 1.001013^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=745efc608197a3becfb8a55e254da872f93865c8;p=dbsrgits%2FDBIx-Class-Fixtures.git fixed problems with new features in last release --- diff --git a/Changes b/Changes index e193148..af2a90a 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ Revision history for DBIx-Class-Fixtures +1.001013 +- fixed functionality in last release by more deeply cloning parameters, which + prevents bad things when parameters get deleted in the wrong places. Also + be sure we clear state properly after a dump. + 1.001012 - Added new method 'available_config_sets' which returns and caches a list of all the json set configs found in the 'config_dir' directory. This was added diff --git a/lib/DBIx/Class/Fixtures.pm b/lib/DBIx/Class/Fixtures.pm index 69d4093..50b9fdf 100644 --- a/lib/DBIx/Class/Fixtures.pm +++ b/lib/DBIx/Class/Fixtures.pm @@ -26,11 +26,11 @@ __PACKAGE__->mk_group_accessors( 'simple' => qw/config_dir =head1 VERSION -Version 1.001012 +Version 1.001013 =cut -our $VERSION = '1.001012'; +our $VERSION = '1.001013'; =head1 NAME @@ -972,11 +972,19 @@ sub dump_config_sets { $localparams->{directory} = $directory_template->($self, $localparams, $set); $localparams->{config} = $set; $self->dump($localparams); + $self->dumped_objects({}); ## Clear dumped for next go, if there is one! } } =head2 dump_all_config_sets + my %local_params = %$params; + my $local_self = bless { %$self }, ref($self); + $local_params{directory} = $directory_template->($self, \%local_params, $set); + $local_params{config} = $set; + $self->dump(\%local_params); + + Works just like L but instead of specifying a single json config set located in L we dump each set in turn to the specified directory.