Revision history for Perl extension DBIx::Class::Schema::Loader
- - generate POD for additional_classes, additional_base_classes,
- left_base_classes, components, result_components_map,
- result_roles and result_roles_map
+ - generate POD for result_base_class, additional_classes,
+ additional_base_classes, left_base_classes, components,
+ result_components_map, result_roles and result_roles_map
- rename result_component_map to result_components_map (old name still
works)
- fix accessor collision detection for methods from
else {
$src_text .= qq|use base '$result_base_class';\n\n|;
}
+
+ $self->_base_class_pod($src_class, $result_base_class)
+ unless $result_base_class eq 'DBIx::Class::Core';
+
$self->_write_classfile($src_class, $src_text);
}
$self->_pod_cut($class);
}
+sub _base_class_pod {
+ my ($self, $class, $base_class) = @_;
+
+ return unless $self->generate_pod;
+
+ $self->_pod($class, "=head1 BASE CLASS: L<$base_class>");
+ $self->_pod_cut($class);
+}
+
sub _filter_comment {
my ($self, $txt) = @_;
my ($table, $col, $info) = @_;
return +{ extra => { is_footext => 1 } } if $col eq 'footext';
},
+ result_base_class => 'My::ResultBaseClass',
additional_classes => 'TestAdditional',
additional_base_classes => 'TestAdditionalBase',
left_base_classes => 'TestLeftBase',
Foo => [
qr/package DBICTest::DumpMore::1::Foo;/,
qr/\n=head1 NAME\n\nDBICTest::DumpMore::1::Foo\n\n=cut\n\n/,
+ qr/\n=head1 BASE CLASS: L<My::ResultBaseClass>\n\n=cut\n\n/,
qr/\n=head1 ADDITIONAL CLASSES USED\n\n=over 4\n\n=item L<TestAdditional>\n\n=back\n\n=cut\n\n/,
qr/\n=head1 ADDITIONAL BASE CLASSES\n\n=over 4\n\n=item L<TestAdditionalBase>\n\n=back\n\n=cut\n\n/,
qr/\n=head1 LEFT BASE CLASSES\n\n=over 4\n\n=item L<TestLeftBase>\n\n=back\n\n=cut\n\n/,
Bar => [
qr/package DBICTest::DumpMore::1::Bar;/,
qr/\n=head1 NAME\n\nDBICTest::DumpMore::1::Bar\n\n=cut\n\n/,
+ qr/\n=head1 BASE CLASS: L<My::ResultBaseClass>\n\n=cut\n\n/,
qr/\n=head1 ADDITIONAL CLASSES USED\n\n=over 4\n\n=item L<TestAdditional>\n\n=back\n\n=cut\n\n/,
qr/\n=head1 ADDITIONAL BASE CLASSES\n\n=over 4\n\n=item L<TestAdditionalBase>\n\n=back\n\n=cut\n\n/,
qr/\n=head1 LEFT BASE CLASSES\n\n=over 4\n\n=item L<TestLeftBase>\n\n=back\n\n=cut\n\n/,