Revision history for Perl extension DBIx::Class::Schema::Loader
+ - added 'generate_pod' option, defaults to on
+
0.04999_14 2010-01-14 06:47:07
- use_namespaces now default, with upgrade/downgrade support
- filter out un-selectable tables/views
_rewriting_result_namespace
use_namespaces
result_namespace
+ generate_pod
/);
=head1 NAME
__PACKAGE__->naming('v5');
+=head2 generate_pod
+
+By default POD will be generated for columns and relationships, using database
+metadata for the text if available and supported (Postgres only so far.)
+
+Set this to C<0> to turn off all POD generation.
+
=head2 relationship_attrs
Hashref of attributes to pass to each generated relationship, listed
$self->_check_back_compat;
$self->use_namespaces(1) unless defined $self->use_namespaces;
+ $self->generate_pod(1) unless defined $self->generate_pod;
$self;
}
my $class = shift;
my $method = shift;
+ return unless $self->generate_pod;
+
if ( $method eq 'table' ) {
my ($table) = @_;
$self->_pod( $class, "=head1 NAME" );
$self->_raw_stmt( $class, "\n=cut\n" );
}
-
# Store a raw source line for a class (for dumping purposes)
sub _raw_stmt {
my ($self, $class, $stmt) = @_;
do_dump_test(
classname => 'DBICTest::DumpMore::1',
+ options => { use_namespaces => 1, generate_pod => 0 },
+ error => '',
+ warnings => [
+ qr/Dumping manual schema for DBICTest::DumpMore::1 to directory /,
+ qr/Schema dump completed/,
+ ],
+ neg_regexes => {
+ 'Result/Foo' => [
+ qr/^=/m,
+ ],
+ },
+);
+
+do_dump_test(
+ classname => 'DBICTest::DumpMore::1',
options => { use_namespaces => 1 },
error => '',
warnings => [