From: Samuel Kaufman Date: Fri, 26 Dec 2014 16:52:26 +0000 (+0000) Subject: explicitly stringify IO::All objects when they are leaving the immediate scope, or... X-Git-Tag: v1.001027_01~1^2~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class-Fixtures.git;a=commitdiff_plain;h=b2c7b63d1d5b518fe65f421a0a16d557e03d83af explicitly stringify IO::All objects when they are leaving the immediate scope, or other functions might mistake them for strings --- diff --git a/lib/DBIx/Class/Fixtures.pm b/lib/DBIx/Class/Fixtures.pm index d3ef790..32bde6e 100644 --- a/lib/DBIx/Class/Fixtures.pm +++ b/lib/DBIx/Class/Fixtures.pm @@ -602,7 +602,7 @@ sub dump { do { #read config my $config_file = io->catfile($self->config_dir, $params->{config}); - $self->load_config_file($config_file); + $self->load_config_file("$config_file"); }; } elsif ($params->{all}) { my %excludes = map {$_=>1} @{$params->{excludes}||[]}; @@ -628,7 +628,7 @@ sub dump { } $self->msg("generating fixtures"); - my $tmp_output_dir = io->dir(tempdir);; + my $tmp_output_dir = io->dir(tempdir); if (-e "$tmp_output_dir") { $self->msg("- clearing existing $tmp_output_dir"); @@ -804,11 +804,11 @@ sub dump_object { }, catfile => sub { my ($self, @args) = @_; - io->catfile(@args); + "".io->catfile(@args); }, catdir => sub { my ($self, @args) = @_; - io->catdir(@args); + "".io->catdir(@args); }, }; @@ -1255,7 +1255,7 @@ sub populate { return DBIx::Class::Exception->throw('connection details must be an arrayref'); } $schema = $self->_generate_schema({ - ddl => $ddl_file, + ddl => "$ddl_file", connection_details => delete $params->{connection_details}, %{$params} });