Bug 9421: tools/picture-upload.pl not Plack-compatible
This patch avoids using file-level private variables in subroutines
by passing the needed variables as parameters to the subroutines.
To test (under Plack):
1) Try uploading a patron image without applying the patch. Notice
it fails.
2) Apply patch.
3) Try uploading a patron image again, noticing this time it succeeds.
To test (under Apache):
1) Apply patch.
2) Try uploading a patron image, confirm that it works.
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Fixes Plack, does not break Apache. Works as expected.
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>