Hi all,

I am using $r->path_info in an Apache handler. The handler is set via a
Location directive:

<Location /cgi-bin/detail.pl> # Overcoming Legacy code :-)
        SetHandler perl-script
        PerlHandler eLogix::Images::Detail
</Location>

And is called like "/cgi-bin/detail.pl/A1234567.jpg". My question is
this: Since there is no physical filename which corresponds to the URL,
what does path_info contain? In the eagle book on page 135, when
path_info is first discussed, the example uses
$r->lookup_uri($path_info) to get the filename, which in this example is
a purely virtual tree.

I currently am using 

my $filename = (split /\//, $r->path_info)[1];

but it seems like such a hack. What is the "suggested" way to get the
"A1234567.jpg" part of the above URL?

-- 
Drew Taylor
Vialogix Communications, Inc.
501 N. College Street
Charlotte, NC 28202
704 370 0550
http://www.vialogix.com/

Reply via email to