Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Getting the Behavior of the "file open or die" Pragma but with a Program Pause (-Mouse)

by tye (Sage)
on Oct 10, 2016 at 20:44 UTC ( [id://1173680]=note: print w/replies, xml ) Need Help??


in reply to Getting the Behavior of the "file open or die" Pragma but with a Program Pause

-Mouse?

- tye        

  • Comment on Re: Getting the Behavior of the "file open or die" Pragma but with a Program Pause (-Mouse)

Replies are listed 'Best First'.
Re^2: Getting the Behavior of the "file open or die" Pragma but with a Program Pause (-Mouse)
by perldigious (Priest) on Oct 10, 2016 at 21:28 UTC

    I love the monastery. Yes tye, that was actually the first place my brain went when I read the brian_d_foy write up that davido linked to. By that I mean trying to figure out a way to use the END block to pause, but only in the event of a die or exit and not if the script finishes and terminates normally. I figured I would try to find a way to make that happen if I could.

    It's also pretty cool that you have a way of sneaking that in as the default behavior for all *.pl files run on a machine, and I probably would have done exactly that as well, except that 99% of the time my scripts are being run locally on various individual work PCs after I've used pp (PAR::PACKER) to compile them in to *.exe files. The * portion is included on a program "white list" maintained by my company's system administrators so all the machines connected to our network let them run around the common security lockouts (of which even cmd.exe is one, sheesh).

    I did manage to get them to add a version of Strawberry Perl to our list of corporate wide available optional software installs, but I don't like asking every new user to go out and install that, so I tend to stick with the PAR::PACKER *.exe method. I'm far from an IT guru, and having to dance the network security circumvention mamba usually just results in me being tired, frustrated, and feeling beaten down by the corporate world.

    I love it when things get difficult; after all, difficult pays the mortgage. - Dr. Keith Whites
    I hate it when things get difficult, so I'll just sell my house and rent cheap instead. - perldigious
      By that I mean trying to figure out a way to use the END block to pause, but only in the event of a die or exit and not if the script finishes and terminates normally.

      perlmod notes:

      Inside an END code block, $? contains the value that the program is going to pass to exit().

      - tye        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2024-04-16 08:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found