[Bast-commits] r3579 - in
branches/DBIx-Class-Schema-Loader/current: .
lib/DBIx/Class/Schema lib/DBIx/Class/Schema/Loader
lib/DBIx/Class/Schema/Loader/DBI t
blblack at dev.catalyst.perl.org
blblack at dev.catalyst.perl.org
Tue Jul 10 16:18:41 GMT 2007
Author: blblack
Date: 2007-07-10 16:18:40 +0100 (Tue, 10 Jul 2007)
New Revision: 3579
Modified:
branches/DBIx-Class-Schema-Loader/current/
branches/DBIx-Class-Schema-Loader/current/Changes
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader.pm
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/Base.pm
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm
branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/RelBuilder.pm
branches/DBIx-Class-Schema-Loader/current/t/20invocations.t
branches/DBIx-Class-Schema-Loader/current/t/21misc_fatal.t
branches/DBIx-Class-Schema-Loader/current/t/22dump.t
branches/DBIx-Class-Schema-Loader/current/t/23dumpmore.t
Log:
r35110 at brandon-blacks-computer (orig r3534): blblack | 2007-06-26 21:59:01 -0500
0.04001, dump_overwrite -> really_erase_my_files
r51939 at brandon-blacks-computer (orig r3563): blblack | 2007-07-02 10:24:29 -0500
fix test skips on Win32
r52201 at brandon-blacks-computer (orig r3576): blblack | 2007-07-10 09:42:02 -0500
fix RT#28073
r52202 at brandon-blacks-computer (orig r3577): blblack | 2007-07-10 09:52:42 -0500
changes updates for the last two fixes
r52203 at brandon-blacks-computer (orig r3578): blblack | 2007-07-10 09:56:56 -0500
credits
Property changes on: branches/DBIx-Class-Schema-Loader/current
___________________________________________________________________
Name: svk:merge
- bd8105ee-0ff8-0310-8827-fb3f25b6796d:/trunk/DBIx-Class-Schema-Loader:3481
+ bd8105ee-0ff8-0310-8827-fb3f25b6796d:/trunk/DBIx-Class-Schema-Loader:3578
Modified: branches/DBIx-Class-Schema-Loader/current/Changes
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/Changes 2007-07-10 14:56:56 UTC (rev 3578)
+++ branches/DBIx-Class-Schema-Loader/current/Changes 2007-07-10 15:18:40 UTC (rev 3579)
@@ -1,5 +1,15 @@
Revision history for Perl extension DBIx::Class::Schema::Loader
+ - Fix Win32 test skip counts (RT #27715, Alexandr Ciornii)
+ - Fix a small output quoting bug (RT #28073, Tokuhiro Matsuno)
+
+0.04001 Tue Jun 26, 2007
+ - Deprecated dump_overwrite. The changed behavior from
+ 0.03xxx was confusing.
+ - Added new option really_erase_my_files, which does what
+ dump_overwrite did in 0.04000, which is not what it did
+ in 0.03xxx.
+
0.04000 Thu Jun 7, 2007
- Added some env vars for controlling the Makefile.PL feature
questions, to make automation easier.
Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/Base.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/Base.pm 2007-07-10 14:56:56 UTC (rev 3578)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/Base.pm 2007-07-10 15:18:40 UTC (rev 3579)
@@ -14,7 +14,7 @@
use Digest::MD5 qw//;
require DBIx::Class;
-our $VERSION = '0.04000';
+our $VERSION = '0.04001';
__PACKAGE__->mk_ro_accessors(qw/
schema
@@ -34,6 +34,7 @@
debug
dump_directory
dump_overwrite
+ really_erase_my_files
db_schema
_tables
@@ -162,6 +163,11 @@
=head2 dump_overwrite
+Deprecated. See L</really_erase_my_files> below, which does *not* mean
+the same thing as the old C<dump_overwrite> setting from previous releases.
+
+=head2 really_erase_my_files
+
Default false. If true, Loader will unconditionally delete any existing
files before creating the new ones from scratch when dumping a schema to disk.
@@ -170,11 +176,15 @@
C<# DO NOT MODIFY THIS OR ANYTHING ABOVE!>
leaving any customizations you placed after that as they were.
-When C<dump_overwrite> is not set, if the output file already exists,
+When C<really_erase_my_files> is not set, if the output file already exists,
but the aforementioned final stanza is not found, or the checksum
contained there does not match the generated contents, Loader will
croak and not touch the file.
+You should really be using version control on your schema classes (and all
+of the rest of your code for that matter). Don't blame me if a bug in this
+code wipes something out when it shouldn't have, you've been warned.
+
=head1 METHODS
None of these methods are intended for direct invocation by regular
@@ -225,6 +235,10 @@
$self->{schema_class} ||= ( ref $self->{schema} || $self->{schema} );
$self->{schema} ||= $self->{schema_class};
+ croak "dump_overwrite is deprecated. Please read the"
+ . " DBIx::Class::Schema::Loader::Base documentation"
+ if $self->{dump_overwrite};
+
$self->{relbuilder} = DBIx::Class::Schema::Loader::RelBuilder->new(
$self->schema_class, $self->inflect_plural, $self->inflect_singular
) if !$self->{skip_relationships};
@@ -292,7 +306,7 @@
$self->_ext_stmt($class, $_);
}
$self->_ext_stmt($class,
- q|# End of lines loaded from '$real_inc_path' |
+ qq|# End of lines loaded from '$real_inc_path' |
);
close($fh)
or croak "Failed to close $real_inc_path: $!";
@@ -449,9 +463,9 @@
my $filename = $self->_get_dump_filename($class);
$self->_ensure_dump_subdirs($class);
- if (-f $filename && $self->dump_overwrite) {
+ if (-f $filename && $self->really_erase_my_files) {
warn "Deleting existing file '$filename' due to "
- . "'dump_overwrite' setting\n";
+ . "'really_erase_my_files' setting\n";
unlink($filename);
}
@@ -511,7 +525,7 @@
}
}
- croak "Cannot not overwrite '$filename' without 'dump_overwrite',"
+ croak "Cannot not overwrite '$filename' without 'really_erase_my_files',"
. " it does not appear to have been generated by Loader"
if !$found;
Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm 2007-07-10 14:56:56 UTC (rev 3578)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/DB2.pm 2007-07-10 15:18:40 UTC (rev 3579)
@@ -6,7 +6,7 @@
use Carp::Clan qw/^DBIx::Class/;
use Class::C3;
-our $VERSION = '0.04000';
+our $VERSION = '0.04001';
=head1 NAME
Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm 2007-07-10 14:56:56 UTC (rev 3578)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm 2007-07-10 15:18:40 UTC (rev 3579)
@@ -6,7 +6,7 @@
use Carp::Clan qw/^DBIx::Class/;
use Class::C3;
-our $VERSION = '0.04000';
+our $VERSION = '0.04001';
=head1 NAME
Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm 2007-07-10 14:56:56 UTC (rev 3578)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Pg.pm 2007-07-10 15:18:40 UTC (rev 3579)
@@ -6,7 +6,7 @@
use Carp::Clan qw/^DBIx::Class/;
use Class::C3;
-our $VERSION = '0.04000';
+our $VERSION = '0.04001';
=head1 NAME
Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm 2007-07-10 14:56:56 UTC (rev 3578)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm 2007-07-10 15:18:40 UTC (rev 3579)
@@ -7,7 +7,7 @@
use Text::Balanced qw( extract_bracketed );
use Class::C3;
-our $VERSION = '0.04000';
+our $VERSION = '0.04001';
=head1 NAME
Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm 2007-07-10 14:56:56 UTC (rev 3578)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/Writing.pm 2007-07-10 15:18:40 UTC (rev 3579)
@@ -1,7 +1,7 @@
package DBIx::Class::Schema::Loader::DBI::Writing;
use strict;
-our $VERSION = '0.04000';
+our $VERSION = '0.04001';
# Empty. POD only.
Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm 2007-07-10 14:56:56 UTC (rev 3578)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm 2007-07-10 15:18:40 UTC (rev 3579)
@@ -6,7 +6,7 @@
use Carp::Clan qw/^DBIx::Class/;
use Class::C3;
-our $VERSION = '0.04000';
+our $VERSION = '0.04001';
=head1 NAME
Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm 2007-07-10 14:56:56 UTC (rev 3578)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/DBI.pm 2007-07-10 15:18:40 UTC (rev 3579)
@@ -7,7 +7,7 @@
use Carp::Clan qw/^DBIx::Class/;
use UNIVERSAL::require;
-our $VERSION = '0.04000';
+our $VERSION = '0.04001';
=head1 NAME
Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/RelBuilder.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/RelBuilder.pm 2007-07-10 14:56:56 UTC (rev 3578)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader/RelBuilder.pm 2007-07-10 15:18:40 UTC (rev 3579)
@@ -5,7 +5,7 @@
use Carp::Clan qw/^DBIx::Class/;
use Lingua::EN::Inflect::Number ();
-our $VERSION = '0.04000';
+our $VERSION = '0.04001';
=head1 NAME
Modified: branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader.pm
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader.pm 2007-07-10 14:56:56 UTC (rev 3578)
+++ branches/DBIx-Class-Schema-Loader/current/lib/DBIx/Class/Schema/Loader.pm 2007-07-10 15:18:40 UTC (rev 3579)
@@ -11,7 +11,7 @@
# Always remember to do all digits for the version even if they're 0
# i.e. first release of 0.XX *must* be 0.XX000. This avoids fBSD ports
# brain damage and presumably various other packaging systems too
-our $VERSION = '0.04000';
+our $VERSION = '0.04001';
__PACKAGE__->mk_classaccessor('_loader_args' => {});
__PACKAGE__->mk_classaccessors(qw/dump_to_dir _loader_invoked _loader/);
Modified: branches/DBIx-Class-Schema-Loader/current/t/20invocations.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/t/20invocations.t 2007-07-10 14:56:56 UTC (rev 3578)
+++ branches/DBIx-Class-Schema-Loader/current/t/20invocations.t 2007-07-10 15:18:40 UTC (rev 3579)
@@ -37,7 +37,7 @@
use DBIx::Class::Schema::Loader qw/ make_schema_at /;
make_schema_at(
'DBICTest::Schema::7',
- { dump_overwrite => 1 },
+ { really_erase_my_files => 1 },
[ $make_dbictest_db::dsn ],
);
DBICTest::Schema::7->clone;
@@ -47,7 +47,7 @@
use base qw/ DBIx::Class::Schema::Loader /;
__PACKAGE__->connect(
$make_dbictest_db::dsn,
- { loader_options => { dump_overwrite => 1 } }
+ { loader_options => { really_erase_my_files => 1 } }
);
},
'embedded_options_in_attrs' => sub {
@@ -57,7 +57,7 @@
$make_dbictest_db::dsn,
undef,
undef,
- { AutoCommit => 1, loader_options => { dump_overwrite => 1 } }
+ { AutoCommit => 1, loader_options => { really_erase_my_files => 1 } }
);
},
'embedded_options_make_schema_at' => sub {
@@ -67,7 +67,7 @@
{ },
[
$make_dbictest_db::dsn,
- { loader_options => { dump_overwrite => 1 } },
+ { loader_options => { really_erase_my_files => 1 } },
],
);
"DBICTest::Schema::10";
@@ -75,7 +75,7 @@
'almost_embedded' => sub {
package DBICTest::Schema::11;
use base qw/ DBIx::Class::Schema::Loader /;
- __PACKAGE__->loader_options( dump_overwrite => 1 );
+ __PACKAGE__->loader_options( really_erase_my_files => 1 );
__PACKAGE__->connect(
$make_dbictest_db::dsn,
undef, undef, { AutoCommit => 1 }
@@ -85,7 +85,7 @@
use DBIx::Class::Schema::Loader;
DBIx::Class::Schema::Loader::make_schema_at(
'DBICTest::Schema::12',
- { dump_overwrite => 1 },
+ { really_erase_my_files => 1 },
[ $make_dbictest_db::dsn ],
);
DBICTest::Schema::12->clone;
Modified: branches/DBIx-Class-Schema-Loader/current/t/21misc_fatal.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/t/21misc_fatal.t 2007-07-10 14:56:56 UTC (rev 3578)
+++ branches/DBIx-Class-Schema-Loader/current/t/21misc_fatal.t 2007-07-10 15:18:40 UTC (rev 3579)
@@ -12,7 +12,7 @@
package DBICTest::Schema;
use base qw/ DBIx::Class::Schema::Loader /;
- __PACKAGE__->loader_options( dump_overwrite => 1 );
+ __PACKAGE__->loader_options( really_erase_my_files => 1 );
__PACKAGE__->storage_type( '::xyzzy' );
}
Modified: branches/DBIx-Class-Schema-Loader/current/t/22dump.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/t/22dump.t 2007-07-10 14:56:56 UTC (rev 3578)
+++ branches/DBIx-Class-Schema-Loader/current/t/22dump.t 2007-07-10 15:18:40 UTC (rev 3579)
@@ -19,7 +19,7 @@
use base qw/ DBIx::Class::Schema::Loader /;
__PACKAGE__->loader_options(
dump_directory => $dump_path,
- dump_overwrite => 1,
+ really_erase_my_files => 1,
);
}
@@ -33,7 +33,7 @@
DBICTest::Schema::1->_loader_invoked(undef);
SKIP: {
- skip "ActiveState perl produces additional warnings", 5
+ skip "ActiveState perl produces additional warnings", 3
if ($^O eq 'MSWin32');
my @warn_output;
Modified: branches/DBIx-Class-Schema-Loader/current/t/23dumpmore.t
===================================================================
--- branches/DBIx-Class-Schema-Loader/current/t/23dumpmore.t 2007-07-10 14:56:56 UTC (rev 3578)
+++ branches/DBIx-Class-Schema-Loader/current/t/23dumpmore.t 2007-07-10 15:18:40 UTC (rev 3579)
@@ -5,11 +5,10 @@
use make_dbictest_db;
require DBIx::Class::Schema::Loader;
-plan tests => 40;
+$^O eq 'MSWin32'
+ ? plan(skip_all => "ActiveState perl produces additional warnings, and this test uses unix paths")
+ : plan(tests => 40);
-plan skip_all => "ActiveState perl produces additional warnings, and this test uses unix paths"
- if ($^O eq 'MSWin32');
-
my $DUMP_PATH = './t/_dump';
sub do_dump_test {
@@ -138,7 +137,7 @@
do_dump_test(
classname => 'DBICTest::DumpMore::1',
- options => { dump_overwrite => 1 },
+ options => { really_erase_my_files => 1 },
error => '',
warnings => [
qr/Dumping manual schema for DBICTest::DumpMore::1 to directory /,
More information about the Bast-commits
mailing list