On Fri, Mar 18, 2011 at 6:21 PM, shawn wilson <[email protected]> wrote:
> > > On Fri, Mar 18, 2011 at 5:45 PM, Uri Guttman <[email protected]> wrote: > >> >>>>> "sw" == shawn wilson <[email protected]> writes: >> >> >> sw> On Fri, Mar 18, 2011 at 5:23 PM, Uri Guttman <[email protected]> >> wrote: >> >> >>>>> "sw" == shawn wilson <[email protected]> writes: >> >> > ok, taking another crack at it (from the top this time): > > my $a = Streamer->new; > my $app = sub { > return [ 200, [ "Content-type" => "text/plain" ], $a->open_fh ]; > } > > ... i think, but a part of me is thinking that if it were that simple, it > would have written like that (bad reasoning for thinking i'm wrong, but...) > oh, crap.... my $a = Streamer->new; my $app = sub { my $a = shift; # <---- i think... return [ 200, [ "Content-type" => "text/plain" ], $a->open_fh ]; }
