Author: hmbrand Date: Thu Jun 10 12:49:49 2010 New Revision: 14136 Modified: dbi/trunk/lib/DBD/DBM.pm dbi/trunk/lib/DBD/File.pm dbi/trunk/t/49dbd_file.t
Log: en_EN spelling consistency some tidying Modified: dbi/trunk/lib/DBD/DBM.pm ============================================================================== --- dbi/trunk/lib/DBD/DBM.pm (original) +++ dbi/trunk/lib/DBD/DBM.pm Thu Jun 10 12:49:49 2010 @@ -1400,7 +1400,7 @@ at [email protected] for commercial support in Germany. Please don't bother Jochen Wiedmann or Jeff Zucker for support - they -handed over further maintainence to H.Merijn Brand and Jens Rehsack. +handed over further maintenence to H.Merijn Brand and Jens Rehsack. =head1 ACKNOWLEDGEMENTS Modified: dbi/trunk/lib/DBD/File.pm ============================================================================== --- dbi/trunk/lib/DBD/File.pm (original) +++ dbi/trunk/lib/DBD/File.pm Thu Jun 10 12:49:49 2010 @@ -534,7 +534,7 @@ $meta or croak "No such table '$table'"; # prevent creation of undef attributes - return $class->get_table_meta_attr( $meta, $attr ); + return $class->get_table_meta_attr ($meta, $attr); } # get_file_meta sub set_file_meta @@ -542,16 +542,14 @@ my ($dbh, $table, $attr, $value) = @_; my $meta; - if ($table eq ".") { + $table eq "." and return $dbh->STORE ($attr, $value); - } - else { - my $class = $dbh->FETCH ("ImplementorClass"); - $class =~ s/::db$/::Table/; - (undef, $meta) = $class->get_table_meta ($dbh, $table, 1); - $meta or croak "No such table '$table'"; - return $class->set_table_meta_attr( $meta, $attr, $value ); - } + + my $class = $dbh->FETCH ("ImplementorClass"); + $class =~ s/::db$/::Table/; + (undef, $meta) = $class->get_table_meta ($dbh, $table, 1); + $meta or croak "No such table '$table'"; + return $class->set_table_meta_attr ($meta, $attr, $value); } # set_file_meta sub clear_file_meta Modified: dbi/trunk/t/49dbd_file.t ============================================================================== --- dbi/trunk/t/49dbd_file.t (original) +++ dbi/trunk/t/49dbd_file.t Thu Jun 10 12:49:49 2010 @@ -8,9 +8,7 @@ use File::Spec; use Test::More; -my $using_dbd_gofer = ($ENV{DBI_AUTOPROXY}||'') =~ /^dbi:Gofer.*transport=/i; - -#use DBI; +my $using_dbd_gofer = ($ENV{DBI_AUTOPROXY}||"") =~ /^dbi:Gofer.*transport=/i; my $tbl; BEGIN { $tbl = "db_". $$ . "_" }; @@ -19,7 +17,7 @@ use_ok ("DBI"); use_ok ("DBD::File"); -my $dir = File::Spec->catdir(getcwd(),'test_output'); +my $dir = File::Spec->catdir (getcwd (), "test_output"); rmtree $dir; mkpath $dir; @@ -33,9 +31,9 @@ ok ($dbh = DBI->connect ("dbi:File:"), "Connect clean"); is (ref $dbh, "DBI::db", "Can connect to DBD::File driver"); -my $f_versions = $dbh->func('f_versions'); +my $f_versions = $dbh->func ("f_versions"); note $f_versions; -ok($f_versions, 'f_versions'); +ok ($f_versions, "f_versions"); # Check if all the basic DBI attributes are accepted ok ($dbh = DBI->connect ("dbi:File:", undef, undef, { @@ -80,18 +78,18 @@ my $tbl2 = $tbl . "2"; my $tbl2_file1 = File::Spec->catfile ($dir, "$tbl2.txt"); - open $fh, ">", $tbl2_file1 or skip; + open $fh, ">", $tbl2_file1 or skip; print $fh "You cannot read this anyway ..."; close $fh; my $tbl2_file2 = File::Spec->catfile ($dir, "$tbl2"); - open $fh, ">", $tbl2_file2 or skip; + open $fh, ">", $tbl2_file2 or skip; print $fh "Neither that"; close $fh; ok ($dbh->do ("drop table if exists $tbl2"), "drop manually created table $tbl2 (first file)"); ok (! -f $tbl2_file1, "$tbl2_file1 removed"); - ok (-f $tbl2_file2, "$tbl2_file2 exists"); + ok ( -f $tbl2_file2, "$tbl2_file2 exists"); ok ($dbh->do ("drop table if exists $tbl2"), "drop manually created table $tbl2 (second file)"); ok (! -f $tbl2_file2, "$tbl2_file2 removed"); }
