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" );