Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

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 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.

Replies are listed 'Best First'.
Re^2: Strategy to track failure...
by toolic (Bishop) 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.

      - 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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1038756]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2018-05-26 09:09 GMT
Find Nodes?
    Voting Booth?