* Bill Moseley <[EMAIL PROTECTED]> [2007-07-26 19:30]: > Looking at an existing version I hacked I see I did something a > bit more crude:
Crude is better in Perl. Handle-like things come in so many shapes that testing for them is futile at best, stupid at worst. > my $body = $c->response->body; > $body = join "\n", <$body> : $body if ref $body; my $body = $c->response->body; eval { local $/; $body = <$body> } if ref $body; die "Response body is an unsupported kind of reference" if ref $body; -- *AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1} &Just->another->Perl->hack; #Aristotle _______________________________________________ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/