No such thing as a small change | |
PerlMonks |
Re: Subs calling themselvesby roboticus (Chancellor) |
on May 07, 2021 at 13:05 UTC ( [id://11132216]=note: print w/replies, xml ) | Need Help?? |
Bod: The second function, access_token, is fetching a value from the object referenced by $self, so it's pretty straightforward. The request function is a *little* more subtle: As you notice, it calls the access_token function, but the result from that call is treated as a reference to an object that has a request function. Note that the object referenced by access_token is *not* necessarily the same class or object found in the request function you posted. So in order to understand what's happening, you'll need to figure out where the access_token member in the object is being set, so you can figure out what sort of object is being accessed. Sometimes when tracking through the code is a bit annoying, I'll do something like a quick edit of the module:
Hope this helps! ...roboticus When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom
|
|