> If this is a redefinition, then look for another module which exports a function with the same name.

Perl keeps the information where (file, line and package) a function was declared before exporting.

There multiple ways to introspect° it, I chose Devel::Peek out of laziness.

Introducing the line 123 in the code just before the redefinition happens will show the culprit.

DB<121> use Cwd DB<122> use Devel::Peek DB<123> Dump \&getcwd if defined &getcwd SV = IV(0x3458550) at 0x3458560 REFCNT = 1 FLAGS = (TEMP,ROK) RV = 0xdc79e0 SV = PVCV(0xe02188) at 0xdc79e0 REFCNT = 11 FLAGS = (DYNFILE,HASEVAL) COMP_STASH = 0xd54290 "Cwd" # PACKAGE START = 0x2985788 ===> 1 ROOT = 0x29ade90 GVGV::GV = 0xdc7b48 "Cwd" :: "_win32_cwd" # NAME FILE = "c:/Perl_524/lib/Cwd.pm" # FILE DEPTH = 0 FLAGS = 0x5000 OUTSIDE_SEQ = 633 PADLIST = 0x29d5aa8 PADNAME = 0x29bb378(0x29ca0a8) PAD = 0xdc79f8(0x29c8968) 1. 0xdc7a28<1> (634,635) "$pwd" OUTSIDE = 0xd540e0 (UNIQUE) DB<124>

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

°) the B backend has methods for it, some modules offer wrapper for it:


In reply to Re^2: Using the perl debugger to look at a renaming files function (introspection) by LanX
in thread Using the perl debugger to look at a renaming files function by Aldebaran

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.