|
From: Blake D. <bl...@ar...> - 2001-04-08 13:56:57
|
$r = shift; simply means that $r will get the value of the first element of
the @_ array. In the case below, $r will have the value of the first
argument passed to the main function. Also, shift completely removes the
first element of the array and shifts the other values down to take its
place.
Blake Day
CTO, SpunkNetwork
bl...@sp... <mailto:bl...@sp...>
home: (770) 338-1589
mobile: (678) 485-0519
-----Original Message-----
From: sla...@li...
[mailto:sla...@li...]On Behalf Of
James Edward Marca
Sent: Sunday, April 08, 2001 12:14 AM
To: slashcode list
Subject: Re: [Slashcode-development] can't upload a file with
multipart/form-data submissions
As is always the case, I think I solved my problem.
I copied file_upload.pl from libapreq/eg/perl into my plugin's perl
code, and made it work fine by editing the print commands.
some lingering black magic---I have no idea what $r=shift means, as in:
sub main(){
...
my $r=shift; ## huh?
## is this getting a reference to myself?
my $apr=Apache::Request->new($r); ## doesn't seem to clash with other
## calls to getCurrentForm()
my $upload=$apr->upload; ## works great.
...
}
Sorry about the noise,
james
_______________________________________________
Slashcode-development mailing list
Sla...@li...
http://lists.sourceforge.net/lists/listinfo/slashcode-development
|