I'm porting the slurp_filename method from 1.x but I cannot figure out
what's rs in save_item? Thanks!
SV *mod_perl_slurp_filename(request_rec *r)
{
dTHR;
PerlIO *fp;
SV *insv;
ENTER;
save_item(rs);
sv_setsv(rs, &sv_undef);
fp = PerlIO_open(r->filename, "r");
insv = newSV(r->finfo.st_size);
sv_gets(insv, fp, 0); /*slurp*/
PerlIO_close(fp);
LEAVE;
return newRV_noinc(insv);
}
_____________________________________________________________________
Stas Bekman JAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide http://perl.apache.org/guide
mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]