Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Was a module use'd or require'd? (do better)

by tye (Sage)
on Aug 13, 2007 at 13:59 UTC ( #632216=note: print w/replies, xml ) Need Help??


in reply to Was a module use'd or require'd?

I think it would be more useful as a debugging aid to not produce results in terms of use. One not-uncommon mistake is getting the order of execution wrong. So instead of trying to output what the module looks like on disk, output something more informative.

Output the order in which each require actually happened and the order in which each import() happened (with what arguments). I think I'd actually hook this via the debugger trace mechanism so you can output the order in which each statement was executed followed by the decompiled subroutines that existed when the require finished and then when import() finished.

- tye        

  • Comment on Re: Was a module use'd or require'd? (do better)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://632216]
help
Chatterbox?
[shmem]: well finally.
[stevieb]: nice! I just finished a GPS "take me home" device last week, and did a bunch of software updates to it yesterday. I also created a pseudo chip with an Arduino to simulate an IC, where it responds to register read/writes over the I2C bus...
[stevieb]: ...from an I2C master. It's ugly and there are many changes I'm going to make, but I had not done anything like it before. It's designed for my RPi:: automated test platform; a system that does CI on *all* my RPi modules.

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2017-06-25 22:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (572 votes). Check out past polls.