[28544] in Perl-Users-Digest
Perl-Users Digest, Issue: 9908 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Oct 31 14:06:38 2006
Date: Tue, 31 Oct 2006 11:05:17 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Tue, 31 Oct 2006 Volume: 10 Number: 9908
Today's topics:
Re: backup via ftp, depth copy, script already out ther <joe@inwap.com>
Distributing application with modules as a single file <tomas.znamenacek@gmail.com>
Re: Distributing application with modules as a single f <john@castleamber.com>
Re: Distributing application with modules as a single f anno4000@radom.zrz.tu-berlin.de
Re: Distributing application with modules as a single f <tomas.znamenacek@gmail.com>
Re: FAQ 3.25 Where can I learn about CGI or Web program <bik.mido@tiscalinet.it>
Re: FAQ 4.29 How can I count the number of occurrences <bik.mido@tiscalinet.it>
Following a redirect <nospam@home.com>
Re: Following a redirect yankeeinexile@gmail.com
Re: Following a redirect <nospam@home.com>
Re: Handling a 450,000x450,000 array with Perl <tzz@lifelogs.com>
Re: Handling a 450,000x450,000 array with Perl xhoster@gmail.com
Re: Handling a 450,000x450,000 array with Perl anno4000@radom.zrz.tu-berlin.de
Re: Handling a 450,000x450,000 array with Perl <bugbear@trim_papermule.co.uk_trim>
Re: Handling a 450,000x450,000 array with Perl <Peter@PSDT.com>
Homemade youtube style (Flash??) videos? <ignoramus18920@NOSPAM.18920.invalid>
Re: How do I do full access logging including HTTP head <joe@inwap.com>
Re: How do I do full access logging including HTTP head <no@spam.com>
Re: How do I do full access logging including HTTP head <john@castleamber.com>
Re: How do I do full access logging including HTTP head <no@spam.com>
Re: How do I do full access logging including HTTP head <john@castleamber.com>
Re: How to get a full trace of a prog's execution? <bol@adv.magwien.gv.at>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Mon, 30 Oct 2006 13:01:34 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: backup via ftp, depth copy, script already out there?
Message-Id: <vbWdnX9i66T19dvYnZ2dnUVZ_rydnZ2d@comcast.com>
J. Gleixner wrote:
> werwer wrote:
>> werwer wrote:
>>> Is there a Net::FTP script already out there which does an in depth
>>> copy from
>>> a given point in a directory structure and copies and recreates the
>>> directory
>>> structure where the files are saved?
>>
>> I should add that the perl script will run from the backup site; going
>> out and collecting files to be stored.
>>
>
> Not a perl solution, but 'rsync' works well.
If the backup process is allowed to run from the server with files,
you've got more options. For instance, on my Windows XP Home machine
I have installed cygwin (including running cron as a service).
Then I have a cron job, running under cygwin on Windows, that executes
'rsync' to copy files from Windows to Linux.
Another option is to set up an rsync server to run as a Windows service.
-Joe
------------------------------
Date: 31 Oct 2006 08:52:09 -0800
From: "zoul" <tomas.znamenacek@gmail.com>
Subject: Distributing application with modules as a single file
Message-Id: <1162313529.029167.243120@h48g2000cwc.googlegroups.com>
Hello!
I have a small Perl application that consists of a single Perl script.
I'd like to improve it and split the code into modules, so that it is
easier for me to work on it. But I like the single-file approach,
because it is so simple - all my users have to do is download a
single file and place it in their ~/bin or wherever they like. If I
split the application into modules, I will have to think of some more
complicated installation procedure.
I thought maybe there was some module to put all the files together
into one single Perl script that would automatically load the modules
and then run the code? This way I could split the code into modules,
work on the modularized code and then create a special all-in-one
script for distribution. Note that I do not want some
auto-decompressing gizmo that would dump the modules on the appropriate
places in the system, I just want the code to stay in one single file
on the user system. I am also not trying to solve module dependencies
- I just want *my* modularized code to stay in a single file. (But I
want to be able to work on separate files while developing, because it
is pain to jump around in one large file.)
Thanks, T.
------------------------------
Date: 31 Oct 2006 17:06:02 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: Distributing application with modules as a single file
Message-Id: <Xns986D70EC3927Ecastleamber@130.133.1.4>
"zoul" <tomas.znamenacek@gmail.com> wrote:
> I thought maybe there was some module to put all the files together
> into one single Perl script that would automatically load the modules
> and then run the code?
Yup: PAR
--
John Experienced Perl programmer: http://castleamber.com/
Perl help, tutorials, and examples: http://johnbokma.com/perl/
------------------------------
Date: 31 Oct 2006 17:07:03 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Distributing application with modules as a single file
Message-Id: <4qpe5nFnshr4U1@news.dfncis.de>
zoul <tomas.znamenacek@gmail.com> wrote in comp.lang.perl.misc:
> Hello!
>
> I have a small Perl application that consists of a single Perl script.
> I'd like to improve it and split the code into modules, so that it is
> easier for me to work on it. But I like the single-file approach,
> because it is so simple - all my users have to do is download a
> single file and place it in their ~/bin or wherever they like. If I
> split the application into modules, I will have to think of some more
> complicated installation procedure.
>
> I thought maybe there was some module to put all the files together
> into one single Perl script that would automatically load the modules
> and then run the code? This way I could split the code into modules,
> work on the modularized code and then create a special all-in-one
> script for distribution. Note that I do not want some
> auto-decompressing gizmo that would dump the modules on the appropriate
> places in the system, I just want the code to stay in one single file
> on the user system. I am also not trying to solve module dependencies
> - I just want *my* modularized code to stay in a single file. (But I
> want to be able to work on separate files while developing, because it
> is pain to jump around in one large file.)
You can replace a statement
use My::Module arg1, ..., argn;
with this functional equivalent
BEGIN {
# content of My/Module.pm here
}
BEGIN {
My::Module->import( arg1, ..., argn);
}
If My::Module doesn't have an import method that part can go.
It shouldn't be hard to do that transformation for certain modules
automatically.
Anno
------------------------------
Date: 31 Oct 2006 10:22:52 -0800
From: "zoul" <tomas.znamenacek@gmail.com>
Subject: Re: Distributing application with modules as a single file
Message-Id: <1162318971.890629.141200@b28g2000cwb.googlegroups.com>
> Yup: PAR
That's exactly it, thank You.
T.
------------------------------
Date: Tue, 31 Oct 2006 11:40:32 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: FAQ 3.25 Where can I learn about CGI or Web programming in Perl?
Message-Id: <3s9ek2di0jc1tc48tbbebnrhon0hk5he6r@4ax.com>
On Mon, 30 Oct 2006 18:03:03 -0800, PerlFAQ Server
<brian@stonehenge.com> wrote:
>3.25: Where can I learn about CGI or Web programming in Perl?
Although I'm sure quite about anybody may have his/her own favourite
resource to share, since it's also true that a lot of *bad* ones do
float around, one may also mention Ovid's CGI Course, which if nothing
else has a very good reputation in many Perl circles, although I can't
remember having seen it mentioned here:
http://users.easystreet.com/ovid/cgi_course/
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Tue, 31 Oct 2006 12:02:58 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: FAQ 4.29 How can I count the number of occurrences of a substring within a string?
Message-Id: <lmaek25ub711goots3shtq2jirbpt1mf5d@4ax.com>
On Fri, 27 Oct 2006 15:41:50 -0500, brian d foy
<brian.d.foy@gmail.com> wrote:
>In article <1161955782.576895.233190@h48g2000cwc.googlegroups.com>,
>werwer <drubnone@yahoo.com> wrote:
>
>
>> > 4.29: How can I count the number of occurrences of a substring within a
>> > string?
>
>> $count = split(/this/, $s);
>
>split() in scalar context is deprecated because of its side effects.
>See perlfunc.
I was about to say that you're wrong and that would be in *void*
context. However I checked and not surprisingly it turned out that *I*
am wrong. Still, one may wonder why *that* behaviour was chosen in the
first place: indeed I can't remember a situation in which I actually
needed to count the chunks returned by a split(), and there are
obvious workarounds if one really wants to do so, but if one considers
that split() often pairs with m/// in list context (with one having
advantages over the other depending on the actual string), then a
larger degree of symmetry between them would be a natural thing to
assume...
PS: hmmm, now that I think of it, this behaviour may be at the basis
of some interesting obfu trick in association with magic goto...
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Tue, 31 Oct 2006 15:24:37 GMT
From: "Nospam" <nospam@home.com>
Subject: Following a redirect
Message-Id: <VUJ1h.21522$j4.6394@newsfe1-win.ntli.net>
I am looking at lwp::useragent to follow a redirect, so far I have :
#! Perl/bin/perl
use strict;
use warnings;
use Data::Dumper;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->timeout(100);
$ua->max_redirect(100);
#my $url= 'http://epa.gov/npdes/';
my $url= 'http://www.google.com';
my $response = $ua->get($url);
print "$url\n";
printing http://epa.gov/npdes/ should redirect to
http://cfpub.epa.gov/npdes/ but nothing happens.
------------------------------
Date: 31 Oct 2006 09:34:58 -0600
From: yankeeinexile@gmail.com
Subject: Re: Following a redirect
Message-Id: <87y7qwo5wd.fsf@gmail.com>
"Nospam" <nospam@home.com> writes:
> I am looking at lwp::useragent to follow a redirect, so far I have :
>
> #! Perl/bin/perl
> use strict;
> use warnings;
>
> use Data::Dumper;
> use LWP::UserAgent;
>
> my $ua = LWP::UserAgent->new;
> $ua->timeout(100);
> $ua->max_redirect(100);
>
>
>
> #my $url= 'http://epa.gov/npdes/';
>
> my $url= 'http://www.google.com';
>
> my $response = $ua->get($url);
>
>
>
> print "$url\n";
>
>
> printing http://epa.gov/npdes/ should redirect to
> http://cfpub.epa.gov/npdes/ but nothing happens.
It isn't clear from reading the documentation, but LWP::UserAgent only
handles redirection at the HTTP layer, not the HTML-layer with
http-equiv.
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lawrence Statton - lawrenabae@abaluon.abaom s/aba/c/g
Computer software consists of only two components: ones and
zeros, in roughly equal proportions. All that is required is to
sort them into the correct order.
------------------------------
Date: Tue, 31 Oct 2006 18:36:07 GMT
From: "Nospam" <nospam@home.com>
Subject: Re: Following a redirect
Message-Id: <rIM1h.48064$Or2.8907@newsfe7-gui.ntli.net>
<yankeeinexile@gmail.com> wrote in message news:87y7qwo5wd.fsf@gmail.com...
> "Nospam" <nospam@home.com> writes:
> > I am looking at lwp::useragent to follow a redirect, so far I have :
> >
> > #! Perl/bin/perl
> > use strict;
> > use warnings;
> >
> > use Data::Dumper;
> > use LWP::UserAgent;
> >
> > my $ua = LWP::UserAgent->new;
> > $ua->timeout(100);
> > $ua->max_redirect(100);
> >
> >
> >
> > #my $url= 'http://epa.gov/npdes/';
> >
> > my $url= 'http://www.google.com';
> >
> > my $response = $ua->get($url);
> >
> >
> >
> > print "$url\n";
> >
> >
> > printing http://epa.gov/npdes/ should redirect to
> > http://cfpub.epa.gov/npdes/ but nothing happens.
>
>
> It isn't clear from reading the documentation, but LWP::UserAgent only
> handles redirection at the HTTP layer, not the HTML-layer with
> http-equiv.
I noticed this, but I also tried the script with 'http://www.google.com'
which normally redirects to google.co.uk, but in the script just stays as
google.com
#! Perl/bin/perl
use strict;
use warnings;
use Data::Dumper;
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
$ua->timeout(100);
$ua->max_redirect(100);
my $url = 'http://www.google.com';
my $response = $ua->get($url);
print "$url \n";
------------------------------
Date: Mon, 30 Oct 2006 20:00:28 +0000
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Handling a 450,000x450,000 array with Perl
Message-Id: <g69vem1h8v7.fsf@lifelogs.com>
On 30 Oct 2006, bugbear@trim_papermule.co.uk_trim wrote:
francescomoi@usa.com wrote:
>> Thank you very much for your quick answers. I try to handle data from a
>> 450x450 meter surface.
>>
>> I've got 100,000 elements distributed on this surface, and each
>> square millimeter can hold one or more elements. So the array to create
>> is a sparse one: most of square millimeters holds zero elements, and
>> the rest, 20 or less.
>>
>> I'm trying to find the square meter with more elements inside.
>
> Ah. OK.
>
> Your question should really be "what data structure should
> I use to..."
>
> It's not really a perl question at all, it's
> really an algorithm and data structure question.
Well no, some languages have sparse arrays and some don't. So this is
definitely a language-specific question, the data structure is pretty
obvious.
For Perl 5, you want either a relevant CPAN module or just use hashes
that combine x and y uniquely. See
http://search.cpan.org/search?query=sparse&mode=all for some ideas.
Ted
------------------------------
Date: 30 Oct 2006 20:21:37 GMT
From: xhoster@gmail.com
Subject: Re: Handling a 450,000x450,000 array with Perl
Message-Id: <20061030152204.568$Iz@newsreader.com>
francescomoi@usa.com wrote:
> Hi.
>
> Thank you very much for your quick answers. I try to handle data from a
> 450x450 meter surface.
>
> I've got 100,000 elements distributed on this surface, and each
> square millimeter can hold one or more elements. So the array to create
> is a sparse one: most of square millimeters holds zero elements, and
> the rest, 20 or less.
>
> I'm trying to find the square meter with more elements inside.
So then, I assume the square meters' must be rotationally aligned parallel
to the axes of the millimeter scale. But can one square meter "slide" by
a millimeter in order to make another square meter, or does it have to
slide by a full meter? I.e. can the potential square meters overlap each
other?
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: 30 Oct 2006 20:29:03 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Handling a 450,000x450,000 array with Perl
Message-Id: <4qn5kfFnklueU1@news.dfncis.de>
bugbear <bugbear@trim_papermule.co.uk_trim> wrote in comp.lang.perl.misc:
> francescomoi@usa.com wrote:
> > Hi.
> >
> > Thank you very much for your quick answers. I try to handle data from a
> > 450x450 meter surface.
> >
> > I've got 100,000 elements distributed on this surface, and each
> > square millimeter can hold one or more elements. So the array to create
> > is a sparse one: most of square millimeters holds zero elements, and
> > the rest, 20 or less.
> >
> > I'm trying to find the square meter with more elements inside.
"The square meter" as in, divide the surface into meter-squares like
a checkerboard and find the one with the most elements? Or as in,
find the one-meter square that holds the most elements? The first
ones must start on integer meter-coordinates, the other can start
anywhere. The second search space is much larger.
> Ah. OK.
>
> Your question should really be "what data structure should
> I use to..."
>
> It's not really a perl question at all, it's
> really an algorithm and data structure question.
There is, however, a likely Perl answer: Use a hash. It is often
the most straight-forward way to represent a sparse anything.
Here one could use blank-separated integer coordinates (in mm) for
keys and the (nonzero) number of elements for values. Values of
zero are *not* entered. Some care may be needed not to autovivify
these non-entries.
Anno
------------------------------
Date: Tue, 31 Oct 2006 10:20:19 +0000
From: bugbear <bugbear@trim_papermule.co.uk_trim>
Subject: Re: Handling a 450,000x450,000 array with Perl
Message-Id: <45472363$0$8730$ed2619ec@ptn-nntp-reader02.plus.net>
francescomoi@usa.com wrote:
> Hi.
>
> Thank you very much for your quick answers. I try to handle data from a
> 450x450 meter surface.
>
> I've got 100,000 elements distributed on this surface, and each
> square millimeter can hold one or more elements. So the array to create
> is a sparse one: most of square millimeters holds zero elements, and
> the rest, 20 or less.
>
> I'm trying to find the square meter with more elements inside.
Guessing game.
Is this data from an archeaological dig?
BugBear
------------------------------
Date: Tue, 31 Oct 2006 13:32:31 GMT
From: Peter Scott <Peter@PSDT.com>
Subject: Re: Handling a 450,000x450,000 array with Perl
Message-Id: <pan.2006.10.31.13.32.29.981558@PSDT.com>
On Mon, 30 Oct 2006 05:10:07 -0800, francescomoi wrote:
> I'd like to create a program to handle data (natural numbers)
> within a 450,000 x 450,000 array. I'm considering Perl, but
> I don't know is it's powerful enough to manage it.
Any time you want to work with a matrix of lots of numbers in Perl,
consider http://pdl.perl.org/.
--
Peter Scott
http://www.perlmedic.com/
http://www.perldebugged.com/
------------------------------
Date: Tue, 31 Oct 2006 18:55:00 +0000 (UTC)
From: Ignoramus18920 <ignoramus18920@NOSPAM.18920.invalid>
Subject: Homemade youtube style (Flash??) videos?
Message-Id: <e4rn6.vrl.17.1@news.alt.net>
Like many people, I make pictures and videos and place them on my own
website (self hosted). I wrote a perl script that makes HTML index
files for directory structures, along with such nice features as image
thumbnails, RSS feed for updates, and even "video thumbnails" (small
animated GIFs that represent first several seconds of a video at the
rate of one frame per second).
That's all nice. What I would like, though, is to also add
functionality to generate whatever Youtube is doing to make videos
that you can see embedded in a page, with the pause and resume buttons
etc. I assume that it is a Flash presentation. Is there some transcode
module or perl module that would let me convert a DivX file into a
video like youtube?
thanks
i
------------------------------
Date: Mon, 30 Oct 2006 12:44:17 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: How do I do full access logging including HTTP headers?
Message-Id: <IYqdnS8T_NTB-dvYnZ2dnUVZ_t-dnZ2d@comcast.com>
Nu wrote:
> My webhost has sucky logging. So I'm looking for a perl or PHP script that
> can do full logging of all the HTTP headers for each hit.
Brian has shown how to look at the headers which the web server
choses to put into the %ENV hash. If there are headers that you
are interested in but the web server throws them away by the
time your script is run, then you are out of luck. You _have_
to change the web server behavior to get at that data. For shared
web hosting, that usually means switching to a different webhost.
-Joe
------------------------------
Date: Mon, 30 Oct 2006 23:47:20 GMT
From: "Nu" <no@spam.com>
Subject: Re: How do I do full access logging including HTTP headers?
Message-Id: <caw1h.384220$QM6.362829@bgtnsc05-news.ops.worldnet.att.net>
"John Bokma" <john@castleamber.com> wrote in message
news:Xns986C81369F03Dcastleamber@130.133.1.4...
> "Nu" <no@spam.com> wrote:
>
> Don't top post, if you don't know what top posting means, look it up in
> the wikipedia.
>
> > I'm on a shared hosting and don't have root access and my host just
> > said their logs are the only ones they give.
>
> What header(s) do you want to log, and for which request(s)?
>
> --
> John Experienced Perl programmer: http://castleamber.com/
>
> Perl help, tutorials, and examples: http://johnbokma.com/perl/
I want to log all the headers of each visitor and then store it in a file
somewhere.
------------------------------
Date: 31 Oct 2006 03:12:58 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: How do I do full access logging including HTTP headers?
Message-Id: <Xns986CD7D2E6449castleamber@130.133.1.4>
"Nu" <no@spam.com> wrote:
>
> "John Bokma" <john@castleamber.com> wrote in message
> news:Xns986C81369F03Dcastleamber@130.133.1.4...
>> "Nu" <no@spam.com> wrote:
>>
>> Don't top post, if you don't know what top posting means, look it up
>> in the wikipedia.
>>
>> > I'm on a shared hosting and don't have root access and my host just
>> > said their logs are the only ones they give.
>>
>> What header(s) do you want to log, and for which request(s)?
>>
>
> I want to log all the headers of each visitor and then store it in a
> file somewhere.
Which additional headers are important to you? Since most should be
available in your access_log (referer, user agent, remote addr, request
path, method, status etc.).
I mean, of the additional headers (maybe I missed out a few):
HTTP_ACCEPT
HTTP_ACCEPT_CHARSET
HTTP_ACCEPT_ENCODING
HTTP_ACCEPT_LANGUAGE
HTTP_CONNECTION
HTTP_KEEP_ALIVE
REMOTE_PORT
you really need those? (just curious)
--
John Experienced Perl programmer: http://castleamber.com/
Perl help, tutorials, and examples: http://johnbokma.com/perl/
------------------------------
Date: Tue, 31 Oct 2006 14:46:38 GMT
From: "Nu" <no@spam.com>
Subject: Re: How do I do full access logging including HTTP headers?
Message-Id: <ilJ1h.156522$QZ1.47101@bgtnsc04-news.ops.worldnet.att.net>
"John Bokma" <john@castleamber.com> wrote in message
news:Xns986CD7D2E6449castleamber@130.133.1.4...
> "Nu" <no@spam.com> wrote:
>
> >
> > "John Bokma" <john@castleamber.com> wrote in message
> > news:Xns986C81369F03Dcastleamber@130.133.1.4...
> >> "Nu" <no@spam.com> wrote:
> >>
> >> Don't top post, if you don't know what top posting means, look it up
> >> in the wikipedia.
> >>
> >> > I'm on a shared hosting and don't have root access and my host just
> >> > said their logs are the only ones they give.
> >>
> >> What header(s) do you want to log, and for which request(s)?
> >>
> >
> > I want to log all the headers of each visitor and then store it in a
> > file somewhere.
>
> Which additional headers are important to you? Since most should be
> available in your access_log (referer, user agent, remote addr, request
> path, method, status etc.).
>
> I mean, of the additional headers (maybe I missed out a few):
>
> HTTP_ACCEPT
> HTTP_ACCEPT_CHARSET
> HTTP_ACCEPT_ENCODING
> HTTP_ACCEPT_LANGUAGE
> HTTP_CONNECTION
> HTTP_KEEP_ALIVE
> REMOTE_PORT
>
> you really need those? (just curious)
Mostly IP, refer, user agent, and any spillings of an IP by a proxy. Maybe
browser.
Is it possible to use .htaccess to trigger a script that runs a log of this
so it will even log when they try to access an image file?
------------------------------
Date: 31 Oct 2006 16:25:56 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: How do I do full access logging including HTTP headers?
Message-Id: <Xns986D6A1F8E282castleamber@130.133.1.4>
"Nu" <no@spam.com> wrote:
> Mostly IP, refer, user agent, and any spillings of an IP by a proxy.
> Maybe browser.
IP, referer, user agent (= browser) *should* be recorded in your
access_log. Proxy, see below.
> Is it possible to use .htaccess to trigger a script that runs a log of
> this so it will even log when they try to access an image file?
Yes, you can use mod_rewrite to route each request through a script and
log all additional information (proxy) that doesn't show up in your
access_log and have the script send back the requested object.
--
John Experienced Perl programmer: http://castleamber.com/
Perl help, tutorials, and examples: http://johnbokma.com/perl/
------------------------------
Date: Tue, 31 Oct 2006 11:27:33 +0100
From: "Ferry Bolhar" <bol@adv.magwien.gv.at>
Subject: Re: How to get a full trace of a prog's execution?
Message-Id: <1162290454.716136@proxy.dienste.wien.at>
kj:
> It would be extremely useful to be able to toggle on something akin
> to "Trace Mode" in the Perl debugger, sending the trace to some
> user-specified file. (Since the bug shows up sporadically and
> unpredictable, it is not practical to try to find it by using the
> Perl debugger.) Is there some other way to get such Trace output?
The Perl debugger provides a non-interactive environment as well.
You can use this to trace a script and write the output into a file:
$ export PERLDB_OPTS="NonStop AutoTrace LineInfo=dbg.out"
$ perl -d <yourscript>.pl
perldoc perldebug (section "Configurable Options")
Greetings, Ferry
--
Ing Ferry Bolhar
Magistrat der Stadt Wien - MA 14
A-1010 Wien
E-Mail: bol@adv.magwien.gv.at
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 9908
***************************************