note
LanX
<I>> the module, in which the login function appears?</I><P>
Don't know what you mean with "appears" ..<P>
<ol>
<li>If you want to know which modules actually <U>use</U> this <I>method</I> (!) , ...<P>
... you could use [DOC://caller|<tt>caller</tt>] inside the method to report the locations at runtime.<P>
(not sure if applying [METAMOD://B::Xref] helps with methods)
</li><P>
<li>If you want to know where the method was <U>defined</U> ...<P>
... you can might be able to use [doc://UNIVERSAL|->can] to get the function's reference
and use introspection with [DOC://B|<tt>B</tt>] to find the origin. (untested, will update code)
</li>
</ol><P>
<H5> Update</H5>
<UL>
<LI> <C>my $c_ref = $obj->can("method_name")</C> will return the reference of the method
<LI> <C>my ($file, $line) = get_code_location($c_ref)</C> in [METAMOD://Sub::Identify] allows you to retrieve the original source location
</UL><P>
the latter can be done without extra module using some half cryptic [DOC://B|<tt>B</tt>] code, but I'm reluctant digging it out.<P>
IIRC an example can be found in the O'Reilly book "Perl Hacks" or google is your friend.<P>
<div class="pmsig"><div class="pmsig-708738">
<p>Cheers Rolf<br>
<sub>(addicted to the Perl Programming Language and [http://i.dailymail.co.uk/i/pix/2014/07/14/article-2690897-1F9F6C0E00000578-463_964x629.jpg|☆☆☆☆] :)
<br> <i>[http://s3.freebeacon.com/up/2015/01/charliehebdo-540x342.png|Je suis Charlie]!</i>
</sub> <P>
</div></div><!-- Wiki2Monks {"version":1.1416} -->
1202071
1202071