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

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

by Hercynium (Hermit)
on Nov 25, 2007 at 15:50 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2022-12-05 11:59 GMT
Find Nodes?
    Voting Booth?

    No recent polls found