On Thu, 22 Oct 2009, Danny Nicholas wrote:

> So this would actually be proper?

[snip]

>> my $envvars = <STDIN>;

I don't "do" Perl, but if that statement reads everything buffered on 
STDIN -- i.e., the AGI environment, then I would guess it would work.

"Proper" would be to read and parse the environment "properly." You could 
make the argument that since you're not going to use anything from the AGI 
environment, why waste the cycles.

I would counter that "best practice" would be to read and parse the 
environment as well as setting up a SIGHUP handler, initializing syslog(), 
setting a STATUS channel variable to FAILURE (and setting it to SUCCESS 
upon successful completion), etc., etc., etc.

I find that "feeping creaturism" is easier to deal with if you start with 
a good framework.

I could have said something about using a "real" language like C so you 
could do everything you want and be finished way before you could even 
load the Perl interpreter but I don't feel like ducking :)

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       [email protected]      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to