Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Think about Loose Coupling
 
PerlMonks  

Re: Parsing of the web log file, access_log

by dash2 (Hermit)
on Jun 20, 2003 at 00:30 UTC ( #267409=note: print w/ replies, xml ) Need Help??


in reply to Parsing of the web log file, access_log

I really think you should consider using the modules other people have mentioned. You are writing your own code to parse the access log, and it looks pretty hairy. Then you are writing your own code to parse dates, and it looks pretty hairy too! Learning to use well-known modules is a price worth paying.

Of course, you may have a great reason not to use Apache::AccessLog and Date::Manip, but if so, what is it?

andramoiennepemousapolutropon


Comment on Re: Parsing of the web log file, access_log
Re: Re: Parsing of the web log file, access_log
by Andy61 (Initiate) on Jun 20, 2003 at 02:25 UTC

    Thanks for the advice. As I mentioned, the code was unfinished and makes you think it's hairy. I was short of ideas on the interval part of the code and that's where I needed help!

    I didn't see any Apache::AccessLog in the CPAN site. Is it available anywhere else? OR you mean the ParseLog Module?

    From your experience, which one is preferable, Date::Manip or Date::Calc?

    Shall appreciate your valuable advice!
    -Andy

      From your experience, which one is preferable, Date::Manip or Date::Calc?
      Date::Calc is almost certainly preferable as it is a faster and smaller module - the only draw back is that it is mostly implemented in XS which means that you have to be able to compile C to be able to install it, but again that shouldn't be a problem in most places. Even the author of Date::Manip says in the documentation for that module:
      Is Date::Manip the one you should be using? In my opinion, the answer is no about 90% of the time.
      Look at the Date::Manip manpage if you want to read the reasons for that statement in full.

      /J\
      

        I downloaded the perl module, Date::Calc from cpan.org. The tarball is Date-Calc-5.3.tar.gz. I am using Cygwin on my PC (It has Windows 2000). Cygwin also has the gcc C compiler with it.

        As per the Install notes, I did 'perl Makefile.PL".

        I got this result.
        $ perl Makefile.PL Checking if your kit is complete... Looks good Warning: prerequisite Bit::Vector failed to load: Can't locate Bit/Vec +tor.pm in @INC (@INC contains: c:/Perl/lib c:/Perl/site/lib .) at (eval 4) line +3. Writing Makefile for Date::Calc Writing patchlevel.h for c:\Perl\bin\perl.exe (5.006001)
        Next, I did "make" and I got:
        $ make Makefile:814: *** missing separator. Stop.

        Has anyone come across this problem? Shall appreciate help on this.
        -Andy

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://267409]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2014-04-18 07:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (463 votes), past polls