license => 'perl',
module_name => 'DBIx::Class::Schema::Loader',
requires => {
+ 'Cwd' => 0,
'Scalar::Util' => 0,
'Data::Dump' => 1.06,
'UNIVERSAL::require' => 0.10,
Revision history for Perl extension DBIx::Class::Schema::Loader
+0.03008 XXX Not yet released
+ - fix for rt.cpan.org #21084 (dump_overwrite pathological output recursion)
+ - fix for rt.cpan.org #21758 (mysql reserved words as table names)
+ - fix for rt.cpan.org #21025 (SQLite FK parsing)
+ - workaround for rt.cpan.org #21746 ($Class::Accessor::Fast::VERSION issues)
+
0.03007 Thu Jul 27 16:19:59 UTC 2006
- Kill erroneous warning about connect/loader_options order (the real
case is warned about elsewhere)
# 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.03007';
+our $VERSION = '0.03007_01';
__PACKAGE__->mk_classaccessor('dump_to_dir');
__PACKAGE__->mk_classaccessor('loader');
use DBIx::Class::Schema::Loader::RelBuilder;
use Data::Dump qw/ dump /;
use POSIX qw//;
+use Cwd qw//;
require DBIx::Class;
__PACKAGE__->mk_ro_accessors(qw/
sub _load_external {
my $self = shift;
+ my $abs_dump_dir;
+
+ $abs_dump_dir = Cwd::abs_path($self->dump_directory)
+ if $self->dump_directory;
+
foreach my $table_class (values %{$self->classes}) {
$table_class->require;
if($@ && $@ !~ /^Can't locate /) {
warn qq/# Loaded external class definition for '$table_class'\n/
if $self->debug;
- if($self->dump_directory) {
+ if($abs_dump_dir) {
my $class_path = $table_class;
$class_path =~ s{::}{/}g;
$class_path .= '.pm';
- my $filename = $INC{$class_path};
+ my $filename = Cwd::abs_path($INC{$class_path});
croak 'Failed to locate actual external module file for '
. "'$table_class'"
if !$filename;
+ next if($filename =~ /^$abs_dump_dir/);
open(my $fh, '<', $filename)
or croak "Failed to open $filename for reading: $!";
$self->_raw_stmt($table_class,