Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9184175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:58:51+00:00 2026-06-17T18:58:51+00:00

I have a Perl Subversion pre-commit hook . A mysterious error message popped up

  • 0

I have a Perl Subversion pre-commit hook. A mysterious error message popped up with someone using Perl 5.14 that had not been seen in earlier versions of Perl:

(in cleanup) Non existant subroutine called Section::File::DESTROY at /home/tftung/svn_repos/hooks/pre-commit-kitchen-sink-hook.pl line 282

First thing that struck me was the misspelling of nonexistent. Boy, that guy can’t spell at all! It’s almost as bad as… my spelling… wait a second…

In line 1251 of my code is this from my AUTOLOAD subroutine:

croak qq(Non existant subroutine called $AUTOLOAD);

Yup, that’s the error line.

This didn’t happen in Perl 5.12 which is what I use on my Mac and is on my PC in both Strawberry and ActiveState flavors. It also does’t happen our corporate Linux boxes which range from Perl 5.8 to 5.10.

It looks like Perl is calling DESTROY, and that’s being picked up by my AUTOLOAD subroutine, and since DESTROY is a non existant subroutine in my package, the AUTOLOAD subroutine displays this error message.

  • Is this a bug or a feature in newer versions of Perl? It appears that AUTOLOAD picking up calls to DESTROY is fairly new feature.
  • How should I fix this? I mean besides getting rid of my AUTOLOAD subroutine which is probably the correct answer. I plan of completely rewriting this script from scratch, so I’d rather not do a lot of work on it.
    • I could write a DESTROY subroutine that does nothing.
    • I could have my AUTOLOAD routine ignore calls to DESTROY.

What is the best way of handling this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:58:52+00:00Added an answer on June 17, 2026 at 6:58 pm

    This should have always happened. If it didn’t happen for you in the past, there might have been a bug in perl that interacted with your code to cause DESTROY not to get called. But in 5.14, it’s working as designed. It’s common for AUTOLOAD subs to do something like return if $AUTOLOAD =~ /::DESTROY$/ to avoid any problems with destruction.

    Having an explicit sub DESTROY { } is faster than dispatching through AUTOLOAD, but it’s the wrong thing to do if you have any superclasses and any of your superclasses have DESTROY methods (they won’t get run). Therefore I consider it a bad habit to get into, even for classes that don’t inherit anything.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to create a subversion pre-lock hook on windows. However I have
I have a Perl script that is calling a program on Windows using backticks.
I have a Perl routine that manages error checking. There are about 10 different
I have a perl webapp that works fine on the server but not on
I have a Perl program, intended to be run from a subversion post-commit script,
I have Perl code that uses the system() function to call robocopy.exe, but it
I am currently learning Perl. I have Perl hash that contains references to hashes
I have a Perl script that takes user input and creates another script that
I have a Perl script that uses WWW::Mechanize to read from a file and
I have a perl script that is getting the current time coming through in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.