Skip Menu |

This queue is for tickets about the DBIx-Class-Schema-Loader CPAN distribution.

Report information
The Basics
Id: 53868
Status: resolved
Priority: 0/
Queue: DBIx-Class-Schema-Loader

People
Owner: Nobody in particular
Requestors: nigel [...] mcnie.name
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.04999_14
Fixed in: (no value)



Subject: [patch] Don't call _make_pod if it's not necessary
Spotted while looking at #53867. May as well check whether pod generation is required _before_ calling _make_pod. All tests still pass.
Subject: dont-call-make-pod-if-its-not-necessary.patch
Index: lib/DBIx/Class/Schema/Loader/Base.pm =================================================================== --- lib/DBIx/Class/Schema/Loader/Base.pm (revision 8394) +++ lib/DBIx/Class/Schema/Loader/Base.pm (working copy) @@ -1373,7 +1373,7 @@ my $method = shift; # generate the pod for this statement, storing it with $self->_pod - $self->_make_pod( $class, $method, @_ ); + $self->_make_pod( $class, $method, @_ ) if $self->generate_pod; my $args = dump(@_); $args = '(' . $args . ')' if @_ < 2; @@ -1391,8 +1391,6 @@ my $class = shift; my $method = shift; - return unless $self->generate_pod; - if ( $method eq 'table' ) { my ($table) = @_; $self->_pod( $class, "=head1 NAME" );
Applied in 0.05000