]> git.donarmstrong.com Git - perltidy.git/commitdiff
added AUTOLOAD subs
authorSteve Hancock <perltidy@users.sourceforge.net>
Fri, 18 Sep 2020 00:52:50 +0000 (17:52 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Fri, 18 Sep 2020 00:52:50 +0000 (17:52 -0700)
lib/Perl/Tidy/Diagnostics.pm
lib/Perl/Tidy/FileWriter.pm
lib/Perl/Tidy/IOScalar.pm
lib/Perl/Tidy/IOScalarArray.pm
lib/Perl/Tidy/IndentationItem.pm
lib/Perl/Tidy/LineBuffer.pm
lib/Perl/Tidy/LineSink.pm
lib/Perl/Tidy/LineSource.pm
lib/Perl/Tidy/Logger.pm
lib/Perl/Tidy/VerticalAligner/Alignment.pm
lib/Perl/Tidy/VerticalAligner/Line.pm

index 45e6fa23914d9bef887858bc701f6dadf00385eb..7362dc173543024da6ad6c26f448ed0a2e574dcb 100644 (file)
@@ -22,6 +22,29 @@ use strict;
 use warnings;
 our $VERSION = '20200907.01';
 
+sub AUTOLOAD {
+
+    # Catch any undefined sub calls so that we are sure to get
+    # some diagnostic information.  This sub should never be called
+    # except for a programming error.
+    our $AUTOLOAD;
+    return if ( $AUTOLOAD eq 'DESTROY' );
+    my ( $pkg, $fname, $lno ) = caller();
+    print STDERR <<EOM;
+======================================================================
+Unexpected call to Autoload looking for sub $AUTOLOAD
+Called from package: '$pkg'  
+Called from File '$fname'  at line '$lno'
+This error is probably due to a recent programming change
+======================================================================
+EOM
+    exit 1;
+}
+
+sub DESTROY {
+    # required to avoid call to AUTOLOAD in some versions of perl
+}
+
 sub new {
 
     my $class = shift;
index 75a599a80a80519f91b1b4ed96f87759ec383f53..0a4704443fea05122d1a865fad0f7f07b64ea852 100644 (file)
@@ -9,6 +9,29 @@ use strict;
 use warnings;
 our $VERSION = '20200907.01';
 
+sub AUTOLOAD {
+
+    # Catch any undefined sub calls so that we are sure to get
+    # some diagnostic information.  This sub should never be called
+    # except for a programming error.
+    our $AUTOLOAD;
+    return if ( $AUTOLOAD eq 'DESTROY' );
+    my ( $pkg, $fname, $lno ) = caller();
+    print STDERR <<EOM;
+======================================================================
+Unexpected call to Autoload looking for sub $AUTOLOAD
+Called from package: '$pkg'  
+Called from File '$fname'  at line '$lno'
+This error is probably due to a recent programming change
+======================================================================
+EOM
+    exit 1;
+}
+
+sub DESTROY {
+    # required to avoid call to AUTOLOAD in some versions of perl
+}
+
 # Maximum number of little messages; probably need not be changed.
 my $MAX_NAG_MESSAGES = 6;
 
index aa60971f19787dc76b11b911d9bf31cd5a73b61b..0f3d820bfc8cbcd9b036e9e69fa2882a2ca936d1 100644 (file)
@@ -12,6 +12,29 @@ use warnings;
 use Carp;
 our $VERSION = '20200907.01';
 
+sub AUTOLOAD {
+
+    # Catch any undefined sub calls so that we are sure to get
+    # some diagnostic information.  This sub should never be called
+    # except for a programming error.
+    our $AUTOLOAD;
+    return if ( $AUTOLOAD eq 'DESTROY' );
+    my ( $pkg, $fname, $lno ) = caller();
+    print STDERR <<EOM;
+======================================================================
+Unexpected call to Autoload looking for sub $AUTOLOAD
+Called from package: '$pkg'  
+Called from File '$fname'  at line '$lno'
+This error is probably due to a recent programming change
+======================================================================
+EOM
+    exit 1;
+}
+
+sub DESTROY {
+    # required to avoid call to AUTOLOAD in some versions of perl
+}
+
 sub new {
     my ( $package, $rscalar, $mode ) = @_;
     my $ref = ref $rscalar;
index e0b9656c5b55bc8e9ca313cb4af217c2c3314efb..44d3fe58e4f964934ab029c836cf7a7ab7956a69 100644 (file)
@@ -16,6 +16,29 @@ use warnings;
 use Carp;
 our $VERSION = '20200907.01';
 
+sub AUTOLOAD {
+
+    # Catch any undefined sub calls so that we are sure to get
+    # some diagnostic information.  This sub should never be called
+    # except for a programming error.
+    our $AUTOLOAD;
+    return if ( $AUTOLOAD eq 'DESTROY' );
+    my ( $pkg, $fname, $lno ) = caller();
+    print STDERR <<EOM;
+======================================================================
+Unexpected call to Autoload looking for sub $AUTOLOAD
+Called from package: '$pkg'  
+Called from File '$fname'  at line '$lno'
+This error is probably due to a recent programming change
+======================================================================
+EOM
+    exit 1;
+}
+
+sub DESTROY {
+    # required to avoid call to AUTOLOAD in some versions of perl
+}
+
 sub new {
     my ( $package, $rarray, $mode ) = @_;
     my $ref = ref $rarray;
index 1923ccf672f0de0c8acb6f7a9cc09bb9474f42a5..0359620b5622ac9a1b1450556ee740bb1f01f530 100644 (file)
@@ -33,6 +33,29 @@ BEGIN {
     };
 }
 
+sub AUTOLOAD {
+
+    # Catch any undefined sub calls so that we are sure to get
+    # some diagnostic information.  This sub should never be called
+    # except for a programming error.
+    our $AUTOLOAD;
+    return if ( $AUTOLOAD eq 'DESTROY' );
+    my ( $pkg, $fname, $lno ) = caller();
+    print STDERR <<EOM;
+======================================================================
+Unexpected call to Autoload looking for sub $AUTOLOAD
+Called from package: '$pkg'  
+Called from File '$fname'  at line '$lno'
+This error is probably due to a recent programming change
+======================================================================
+EOM
+    exit 1;
+}
+
+sub DESTROY {
+    # required to avoid call to AUTOLOAD in some versions of perl
+}
+
 sub new {
 
     # Create an 'indentation_item' which describes one level of leading
index cc70356b4418e5e5a7406dbb1662a7f2beb8a53c..7aa2fcd3b3b222f57a9bdaa670db8997ed91df33 100644 (file)
@@ -14,6 +14,29 @@ use strict;
 use warnings;
 our $VERSION = '20200907.01';
 
+sub AUTOLOAD {
+
+    # Catch any undefined sub calls so that we are sure to get
+    # some diagnostic information.  This sub should never be called
+    # except for a programming error.
+    our $AUTOLOAD;
+    return if ( $AUTOLOAD eq 'DESTROY' );
+    my ( $pkg, $fname, $lno ) = caller();
+    print STDERR <<EOM;
+======================================================================
+Unexpected call to Autoload looking for sub $AUTOLOAD
+Called from package: '$pkg'  
+Called from File '$fname'  at line '$lno'
+This error is probably due to a recent programming change
+======================================================================
+EOM
+    exit 1;
+}
+
+sub DESTROY {
+    # required to avoid call to AUTOLOAD in some versions of perl
+}
+
 sub new {
 
     my ( $class, $line_source_object ) = @_;
index d092583b87239b93c56c444907a4503d7fb31a60..e8b1306a67216068a18173d3c7d5f85d01055e97 100644 (file)
@@ -10,6 +10,29 @@ use strict;
 use warnings;
 our $VERSION = '20200907.01';
 
+sub AUTOLOAD {
+
+    # Catch any undefined sub calls so that we are sure to get
+    # some diagnostic information.  This sub should never be called
+    # except for a programming error.
+    our $AUTOLOAD;
+    return if ( $AUTOLOAD eq 'DESTROY' );
+    my ( $pkg, $fname, $lno ) = caller();
+    print STDERR <<EOM;
+======================================================================
+Unexpected call to Autoload looking for sub $AUTOLOAD
+Called from package: '$pkg'  
+Called from File '$fname'  at line '$lno'
+This error is probably due to a recent programming change
+======================================================================
+EOM
+    exit 1;
+}
+
+sub DESTROY {
+    # required to avoid call to AUTOLOAD in some versions of perl
+}
+
 sub new {
 
     my ( $class, @args ) = @_;
index 1b752238f690aeec530b31788d2c6b36df77bec7..2261c54c253b9475970dd21e8d9fd19b59537e28 100644 (file)
@@ -10,6 +10,29 @@ use strict;
 use warnings;
 our $VERSION = '20200907.01';
 
+sub AUTOLOAD {
+
+    # Catch any undefined sub calls so that we are sure to get
+    # some diagnostic information.  This sub should never be called
+    # except for a programming error.
+    our $AUTOLOAD;
+    return if ( $AUTOLOAD eq 'DESTROY' );
+    my ( $pkg, $fname, $lno ) = caller();
+    print STDERR <<EOM;
+======================================================================
+Unexpected call to Autoload looking for sub $AUTOLOAD
+Called from package: '$pkg'  
+Called from File '$fname'  at line '$lno'
+This error is probably due to a recent programming change
+======================================================================
+EOM
+    exit 1;
+}
+
+sub DESTROY {
+    # required to avoid call to AUTOLOAD in some versions of perl
+}
+
 sub new {
 
     my ( $class, @args ) = @_;
index 4d288a8b0284fd3a2960f2dc4a47b432054a0dad..294b505a1d1d48a919c41f389d98419a26ac347f 100644 (file)
@@ -9,6 +9,29 @@ use strict;
 use warnings;
 our $VERSION = '20200907.01';
 
+sub AUTOLOAD {
+
+    # Catch any undefined sub calls so that we are sure to get
+    # some diagnostic information.  This sub should never be called
+    # except for a programming error.
+    our $AUTOLOAD;
+    return if ( $AUTOLOAD eq 'DESTROY' );
+    my ( $pkg, $fname, $lno ) = caller();
+    print STDERR <<EOM;
+======================================================================
+Unexpected call to Autoload looking for sub $AUTOLOAD
+Called from package: '$pkg'  
+Called from File '$fname'  at line '$lno'
+This error is probably due to a recent programming change
+======================================================================
+EOM
+    exit 1;
+}
+
+sub DESTROY {
+    # required to avoid call to AUTOLOAD in some versions of perl
+}
+
 sub new {
 
     my ( $class, @args ) = @_;
index 7ff671c0494e576765f64769cf4dcca2e5717b1f..9d3c0a8392e614c1ed7b44ac37fb13c7ebb14b1d 100644 (file)
@@ -49,6 +49,25 @@ our $VERSION = '20200907.01';
         return $self;
     }
 
+    sub AUTOLOAD {
+    
+        # Catch any undefined sub calls so that we are sure to get
+        # some diagnostic information.  This sub should never be called
+        # except for a programming error.
+        our $AUTOLOAD;
+        return if ( $AUTOLOAD eq 'DESTROY' );
+        my ( $pkg, $fname, $lno ) = caller();
+        print STDERR <<EOM;
+    ======================================================================
+    Unexpected call to Autoload looking for sub $AUTOLOAD
+    Called from package: '$pkg'  
+    Called from File '$fname'  at line '$lno'
+    This error is probably due to a recent programming change
+    ======================================================================
+EOM
+        exit 1;
+    }
+
     sub DESTROY {
         my $self = shift;
         $self->_decrement_count();
index 9bf5520f5af5165c10abe4c798117db2e32d7c15..50de123e4c0f01835d32660659f4d2e72d1fe573 100644 (file)
@@ -67,6 +67,25 @@ our $VERSION = '20200907.01';
         return $self;
     }
 
+    sub AUTOLOAD {
+    
+        # Catch any undefined sub calls so that we are sure to get
+        # some diagnostic information.  This sub should never be called
+        # except for a programming error.
+        our $AUTOLOAD;
+        return if ($AUTOLOAD eq 'DESTROY');
+        my ( $pkg, $fname, $lno ) = caller();
+        print STDERR <<EOM;
+    ======================================================================
+    Unexpected call to Autoload looking for sub $AUTOLOAD
+    Called from package: '$pkg'  
+    Called from File '$fname'  at line '$lno'
+    This error is probably due to a recent programming change
+    ======================================================================
+EOM
+        exit 1;
+    }
+
     sub DESTROY {
         my $self = shift;
         $self->_decrement_count();