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

Re: how to find the module of a specific function?

by Anonymous Monk
on Oct 26, 2017 at 17:37 UTC ( #1202087=note: print w/replies, xml ) Need Help??


in reply to how to find the module of a specific function?

In your example, login necessarily must be a method of the TeamForge6 object, defined somewhere in it or in its superclass(es), and you should be able to simply go to the appropriate .pm file to find it. If it is at-all difficult to do this reliably, then the design of the application's class structure should be reconsidered.
  • Comment on Re: how to find the module of a specific function?

Replies are listed 'Best First'.
Re^2: how to find the module of a specific function?
by Anonymous Monk on Oct 26, 2017 at 20:14 UTC
    In your example, login necessarily must be a method of the TeamForge6 object

    nope, TeamForge6->new can return whatever it wants

      One example of what anonymonk is getting at here (and yes, I've done this for legitimate purposes a few times that I can recall):

      use warnings; use strict; package Fraud; { sub new { return bless {}, shift; } sub login { print "HA-HA, I'm not who you think I am!\n"; } } package Trust; { sub new { return Fraud->new; } sub login { # recently was watching "That 70's Show" print "no login for you, dumbass\n"; } } package main; { my $obj = Trust->new; $obj->login; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1202087]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2022-05-27 15:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (96 votes). Check out past polls.

    Notices?