Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Is this code which is using Switch.pm safe?

by GrandFather (Sage)
on Nov 22, 2012 at 08:22 UTC ( #1005074=note: print w/replies, xml ) Need Help??


in reply to Is this code which is using Switch.pm safe?

Rather than provide links to pages that may cease to be, please provide small samples of your code inside <code> tags in your node.

The Switch module is a source filter which is something to generally avoid for production code. If you can't use 5.10 or later and given/when then I'd strongly recommend one of the other alternatives to switch that you mention. Depending on what your code looks like, I'd tend toward a dispatch table.

True laziness is hard work
  • Comment on Re: Is this code which is using Switch.pm safe?

Replies are listed 'Best First'.
Re^2: Is this code which is using Switch.pm safe?
by Chankey Pathak (Novice) on Nov 22, 2012 at 08:31 UTC
    @<code>:Okay I'll take care of it from next time.

    @Switch: Okay, thanks.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005074]
help
Chatterbox?
[erix]: yeah... trepidation
Corion quivers with antici...
[choroba]: if you turn off autocommit and run a prepared statement which fails, the transaction is automatically rolled back, at least in DBD::Pg
[erix]: at least, I'll know where to find the documentation :P
[choroba]: but if there's no prepared statement, there's no rollback
[choroba]: the rollback happens when deallocating the prepared statement in error state.
[choroba]: is this something that Pg enforces, or just a consequence of the Perl implementation?
[choroba]: also, does it make any sense? We run different statements generated from input structures, sometimes prepared statements are involved, sometimes not. We want the behaviour to be consistent.

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2017-09-19 12:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (220 votes). Check out past polls.

    Notices?