Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^6: (How) Do you document/test your private subroutines? (->can)

by LanX (Saint)
on Nov 12, 2018 at 17:41 UTC ( [id://1225651]=note: print w/replies, xml ) Need Help??


in reply to Re^5: (How) Do you document/test your private subroutines?
in thread (How) Do you document/test your private subroutines?

> you might accidentally define _frobnicate in the child class ... and kaboom!

for completeness, we might not get a "Subroutine _frobnicate redefined at" warning but it is possible to dynamically inspect a parent class with ->can from UNIVERSAL

So it's not that the "sub-class"-developer is completely in the dark.

It should even be possible to check this automatically.

(which is the saner approach since people don't tend to read the docs after a parent class got extended)

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

  • Comment on Re^6: (How) Do you document/test your private subroutines? (->can)
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-24 13:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found