http://qs321.pair.com?node_id=635323


in reply to Re: overload and the perl debugger (StrVal)
in thread overload and the perl debugger

There's little sense in copying out of overload.pm - that module is core and is always available.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

  • Comment on Re^2: overload and the perl debugger (StrVal)

Replies are listed 'Best First'.
Re^3: overload and the perl debugger (reuse)
by tye (Sage) on Aug 27, 2007 at 16:01 UTC

    For one, "core" does not actually mean "always available". For another, copying what boils down to two lines of code isn't something I sweat much about.

    But, perhaps most importantly, if one can't even use "$x" because it calls a subroutine, then I'm not sure one can, um, call a subroutine. I haven't tried to write a debugger but perldebguts says:

    When execution of the program reaches a subroutine call, a call to &DB::sub(args) is made instead, with $DB::sub holding the name of the called subroutine. (This doesn't happen if the subroutine was compiled in the DB package.)

    (emphasis added). So I think you might need to recompile those couple of lines of code into a different package in this case.

    And I wouldn't be surprised if understanding the few key concepts presented in those several lines of code from the 3 subroutines wouldn't lead to a better way to integrate the concepts into the OP's code then would be possible by just calling those routines.

    - tye