Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Strategy to track failure...

by BrowserUk (Pope)
on Jun 13, 2013 at 14:49 UTC ( #1038756=note: print w/ replies, xml ) Need Help??


in reply to Strategy to track failure...

The first thing I would do is (install Devel::Trace if you don't already have it), and run the failing script like this:

perl -d:Trace theScript.pl 2 > log

When it stops (due to the throw Error::Simple($error);), the last few lines in the log will tell you where it had just been. It'll give you a starting point.

If you then do the same with the working code, you should be able to match up the logs from the entry point in NetLocalGroupEnum() and see where they diverge which should get you to the point of failure quickly.

Then you can start adding a few prints at that point to work out why.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re: Strategy to track failure...
Select or Download Code
Re^2: Strategy to track failure...
by toolic (Chancellor) on Jun 13, 2013 at 15:15 UTC
    Then you can start adding a few prints at that point to work out why.
    Or, if you don't mind the shotgun approach, Devel::DumpTrace will print variable values, too. It may be too verbose to be useful in some cases.
      BrowserUK and Toolic, thanks. I've used both of those before and they should help. Apparently, was having a brain cramp earlier and bothered y'all instead of thinking them up, myself.

      Lanx,
      - identical perl version.
      - identical modules installed.
      - Don't remember the results of tests during install.... 'Been a while. But, we're not in the habit of using modules that don't test out pretty cleanly.
      - Not my choice to use Win32::Lanman. That having been said, it seems to be widely used and stable.... (except for this wrinkle).
      - Hadn't thought about contacting the author. Good idea that I'll pursue if Devel::Trace and/or Devel::DumpTrace are not fruitful.


      Thanks all.
      Gives me plenty to chew on.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (6)
As of 2014-09-22 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (189 votes), past polls