Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^4: Logging run-time warnings from an embedded perl interpreter

by Hercynium (Hermit)
on Nov 25, 2007 at 15:50 UTC ( [id://652836]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Logging run-time warnings from an embedded perl interpreter
in thread [RESOLVED*] Logging run-time warnings from an embedded perl interpreter

actually, it's just there so that the application can 'see' those vars when validating the code, before storing it for later execution.

What appears to be happening with this app is that a persistent perl interpreter is running, and then user-defined 'snippets' of code are evaluated within that interpreter when an SNMP event happens. There are certain variables made available to the user for use within those code snippets, created and set at run-time somehow by the app. However, when you turn on strict within the snippet, using those vars results in a validation error. Hence my use of the (admittedly icky) construct.

For data that I wish to persist between code evaluations I've been using our %VAR = () unless %VAR; which works as expected, though it still feels icky. The app gives no ready mechanism for initialization of anything at startup, and my experiments with BEGIN blocks have been less than encouraging.

Anyhow, I appreciate the advice! Perhaps someday I'll find the time to develop an app that can compete with this monstrosity and force the developers to actually make it usable for a change :)

Log In?
Username:
Password:

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

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

    No recent polls found