Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I'm a bit flabbergasted that this was not more loudly advertised. I think i like the change ... it seems awful silly to have to declare a sub that does nothing if you want default behavior. I tried searching for "destroy" from this delta page, but didn't find anything that seemed directly related:

  • Changes to UNIVERSAL::DESTROY now update DESTROY caches in all classes, instead of causing classes that have already had objects destroyed to continue using the old sub. This was a regression in Perl 5.18. (perl #114864)
  • When die, last, next, redo, goto and exit unwind the scope, it is possible for DESTROY recursively to call a subroutine or format that is currently being exited. It that case, sometimes the lexical variables inside the sub would start out having values from the outer call, instead of being undefined as they should. This has been fixed. (perl #119311)
  • Undefining a glob that triggers a DESTROY method that undefines the same glob is now safe. It used to produce "Attempt to free unreferenced glob pointer" warnings and leak memory.
  • If subroutine redefinition (eval 'sub foo{}' or newXS for XS code) triggers a DESTROY method on the sub that is being redefined, and that method assigns a subroutine to the same slot (*foo = sub {} ), $_[0] is no longer left pointing to a freed scalar. Now DESTROY is delayed until the new subroutine has been installed.

I don't think any of these are directly responsible for the change, but perhaps they might be implicitly? Sorry i don't have an answer, but maybe this will help you track down when it happened. It should be advertised, methinks ... maybe it was in error?

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

In reply to Re^3: DESTROY and AUTOLOAD in 5.20.1 (fixed bug) by jeffa
in thread DESTROY and AUTOLOAD in 5.20.1 by szabgab

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-04-24 10:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found