| mrpengu1n | what is the stream used when a cgi program is being run its not STDOUT is it? |
| warpzero | for 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 |
| mrpengu1n | I dunno, my online program no longer works after selecting stdout |
| warpzero | but it doesn't have any way of passing an object to that error routine |
| mrpengu1n | ok nm the server doesnt have tidy |
| warpzero | and since the error routine i want is in an object and needs object data what do i do |
| Randal | write a closure |
| sili | create_function() |
| Randal | $appconfig->set_error_routine(sub { ... anything you want including $My_object }); whatever the interface is |
| sili | let's just create an annonymous class, instantiate it, and pass it! |
| Randal | It's not polite to Pass Class in pubic public either heh nice slip |
| warpzero | how do i get the $object ref in that sub |
| sili | indeed |
| Randal | warpzero - just let it be a closure var my $object = Foo->new; ..... $appconfig->set_error_routine(sub { ... $object ... }); it will bind to that |
| somian | Randal, all: http://home.att.net/~perlspinr/trh.txt |
| hobbs | warpzero: if $object is in your lexical scope when you're setting the callback, then the sub can see it. |
| somian | I'm not going to clog the channel up with all that detail. |
| warpzero | i'm so confused on how that possibly works |
| somian | Read and weep. Or not, because it is just irc. |
| sili | Chris62vw: http://home.att.net/~perlspinr/trh.txt |
| Chris62vw | oh boy, here we go again |
| sili | Chris62vw: somnian is calling you an aminal! |
| Chris62vw | sili, I know. I see my name in it. I'm not going to read it |
| warpzero | mrow i'm an animal an animal who doesn't understand this closure var thing |
| somian | Of course you are, warpzero -- ever human being is. every* |