#perl - Wed 28 Mar 2007 between 18:06 and 18:13



mrpengu1nwhat is the stream used when a cgi program is being run
its not STDOUT is it?
warpzerofor the output of the cgi program?
its STDOUT
doesn't the httpd just attach to its stdout
so AppConfig
it lets me give it a subref to use my own error routine
mrpengu1nI dunno, my online program no longer works after selecting stdout
warpzerobut it doesn't have any way of passing an object to that error routine
mrpengu1nok nm the server doesnt have tidy
warpzeroand since the error routine i want is in an object and needs object data
what do i do
Randalwrite a closure
silicreate_function()
Randal$appconfig->set_error_routine(sub { ... anything you want including $My_object });
whatever the interface is
sililet's just create an annonymous class, instantiate it, and pass it!
RandalIt's not polite to Pass Class in pubic
public either
heh
nice slip
warpzerohow do i get the $object ref in that sub
siliindeed
Randalwarpzero - just let it be a closure var
my $object = Foo->new; ..... $appconfig->set_error_routine(sub { ... $object ... });
it will bind to that
somianRandal, all: http://home.att.net/~perlspinr/trh.txt
hobbswarpzero: if $object is in your lexical scope when you're setting the callback, then the sub can see it.
somianI'm not going to clog the channel up with all that detail.
warpzeroi'm so confused on how that possibly works
somianRead and weep. Or not, because it is just irc.
siliChris62vw: http://home.att.net/~perlspinr/trh.txt
Chris62vwoh boy, here we go again
siliChris62vw: somnian is calling you an aminal!
Chris62vwsili, I know. I see my name in it. I'm not going to read it
warpzeromrow
i'm an animal
an animal who doesn't understand this closure var thing
somianOf course you are, warpzero -- ever human being is.
every*

Page: 3 10 17 24 31 38 45 52 59 66 73 80 87 94 101 108 115 122 

IrcArchive