# 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.04999_07';
+our $VERSION = '0.04999_12';
__PACKAGE__->mk_classaccessor('_loader_args' => {});
-__PACKAGE__->mk_classaccessors(qw/dump_to_dir _loader_invoked _loader loader_class/);
+__PACKAGE__->mk_classaccessors(qw/
+ dump_to_dir _loader_invoked _loader loader_class naming
+/);
=head1 NAME
$args->{schema_class} = $class;
weaken($args->{schema}) if ref $self;
$args->{dump_directory} ||= $self->dump_to_dir;
+ $args->{naming} = $self->naming;
# XXX this only works for relative storage_type, like ::DBI ...
my $impl = $self->loader_class
sub import {
my $self = shift;
+
return if !@_;
+
+ my $cpkg = (caller)[0];
+
foreach my $opt (@_) {
if($opt =~ m{^dump_to_dir:(.*)$}) {
$self->dump_to_dir($1)
}
elsif($opt eq 'make_schema_at') {
no strict 'refs';
- my $cpkg = (caller)[0];
*{"${cpkg}::make_schema_at"} = \&make_schema_at;
}
+ elsif($opt eq 'naming') {
+ no strict 'refs';
+ *{"${cpkg}::naming"} = sub { $self->naming(@_) };
+ }
}
}
sub rescan { my $self = shift; $self->_loader->rescan($self) }
+=head2 naming
+
+=over 4
+
+=item Arguments: \%opts | $ver
+
+=back
+
+Controls the naming options for backward compatibility, see
+L<DBIx::Class::Schema::Loader::Base/naming> for details.
+
+To upgrade a dynamic schema, use:
+
+ __PACKAGE__->naming('current');
+
+Can be imported into your dump script and called as a function as well:
+
+ naming('v4');
=head1 KNOWN ISSUES
In "normal" L<DBIx::Class::Schema> usage, manually-defined
source classes and relationships have no problems crossing vendor schemas.
-=head1 AUTHOR
+=head1 ACKNOWLEDGEMENTS
-Brandon Black, C<blblack@gmail.com>
+Matt S Trout, all of the #dbix-class folks, and everyone who's ever sent
+in a bug report or suggestion.
Based on L<DBIx::Class::Loader> by Sebastian Riedel
Based upon the work of IKEBE Tomohiro
-=head1 THANK YOU
+=head1 AUTHOR
-Matt S Trout, all of the #dbix-class folks, and everyone who's ever sent
-in a bug report or suggestion.
+blblack: Brandon Black <blblack@gmail.com>
+
+=head1 CONTRIBUTORS
+
+ilmarii: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
+
+arcanez: Justin Hunter <justin.d.hunter@gmail.com>
+
+ash: Ash Berlin <ash@cpan.org>
+
+Caelum: Rafael Kitover <rkitover@cpan.org>
+
+TSUNODA Kazuya <drk@drk7.jp>
+
+Robert Bohne <rbo@openserv.org>
+
+ribasushi: Peter Rabbitson <rabbit+dbic@rabbit.us>
+
+gugu: Andrey Kostenko <a.kostenko@rambler-co.ru>
+
+... and lots of other folks. If we forgot you, please write the current
+maintainer or RT.
+
+=head1 COPYRIGHT & LICENSE
-=head1 LICENSE
+Copyright (c) 2006 - 2009 by the aforementioned
+L<DBIx::Class::Schema::Loader/AUTHOR> and
+L<DBIx::Class::Schema::Loader/CONTRIBUTORS>.
This library is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.