Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^4: Win32::API Memory Exception with GetCommandLine() (which returns a static string)

by Wyrdweaver (Beadle)
on Jul 07, 2007 at 17:55 UTC ( [id://625432]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Win32::API Memory Exception with GetCommandLine() (which returns a static string)
in thread Win32::API Memory Exception with GetCommandLine() (which returns a static string)

Thanks for the comments and investigation.

The ".bat" wrapper is used because XP/NT (and possibly still Vista) don't always redirect STDIO/STDOUT correctly for scripts executed through file associations (see http://aspn.activestate.com/ASPN/docs/ActivePerl/5.8/faq/Windows/ActivePerl-Winfaq5.html#STDIN_and_STDOUT_and_Piping_don and http://support.microsoft.com/kb/321788).

I used the "pack" because the example in Win32::API did so and I thought it might be there to fix the memory violations.

  • Comment on Re^4: Win32::API Memory Exception with GetCommandLine() (which returns a static string)

Replies are listed 'Best First'.
Re^5: Win32::API Memory Exception with GetCommandLine() (which returns a static string)
by BrowserUk (Patriarch) on Jul 07, 2007 at 18:38 UTC

    I understand the purpose of bat-wrapping (sounds like something they'd do on the Lower East Side :), but for the purposes of demonstration it seemed excessive. Of course, I now know that the problem only occured when the script, presumably reduced from the original be the problem manifest itself, is so bat-wrapped.

    For the pack, I'd never notice that example before. Maybe it was necessary in early versions, and the example just never got updated.

    Anyway, asked and answered. Thanks.


    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.

Log In?
Username:
Password:

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

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

    No recent polls found