in reply to Upgrade-proofing overridden subroutines

If the version method is called, the replace will die loudly
Wouldn't it be $override->version() that dies loudly?

In answer to your question, except for my confusion above, yes, this strikes me as a nicely balanced solution for the many cases where it isn't easy or reliable to detect the specific flaw.

  • Comment on Re: Upgrade-proofing overridden subroutines

Replies are listed 'Best First'.
Re^2: Upgrade-proofing overridden subroutines
by Ovid (Cardinal) on Aug 15, 2006 at 11:53 UTC

    Yes, you're right. version should die. However, I also realized two problems. One, some modules don't have versions (shame on them) or they get released without a version upgrade (this is common when you have a distribution where only the main module's version changes). As a result, what I should really do is this:

    $override->verify( module => 'Broken::Module', verify => \&verification_callback, fatal => $boolean_value, # defaults to true );

    Cheers,
    Ovid

    New address of my CGI Course.