|Don't ask to ask, just ask|
Re^14: Question about the most efficient way to read Apache log files without All-In-One Modules from CPAN (personal learning exercise)by wrog (Friar)
|on Jun 19, 2015 at 02:13 UTC||Need Help??|
What a masterpiece of projection (*). Likewise for the self-aggrandizing rewrite of history. Anyway, congratulations on earning my very first downvote.
Just to make sure I wasn't going completely crazy, I ran Apache::Log::Parser on my server log and it correctly parsed all of the 408 lines just fine, in both fast and strict modes.
Which means the regexp you cited is evidently not used all of the time. The "proper parser" does not, in fact, break, and the module author (unlike you) evidently did put a fair amount of thought into this -- as was clear enough from my first read of the code.
Re "You pop up and rather trying to help the op; you attempt to pick holes in my post; despite that its purpose was to save the OP wasting time with pack & unpack." Actually no. I was simply pointing out that split is fine if you're REALLY SURE about the delimiter character. But in this context, there's good reason NOT to be and therefore split is likely to be almost as big a waste of time as pack. If you want to learn how regexps work, then just learn them already. If you don't, then use Text::CSV. Both observations intended to help the OP.
And nothing you've said has invalidated either of those observations.
Also note that at NO point did the OP indicate any aversion to using existing packages -- "learning exercise" does not always mean "wanting to write everything from scratch".
Re: logname and user. I don't specifically know what happens in Apache if the Authn handler passes back a username with a space it -- quoting it with '%20' or '+' actually would be a good idea -- which I indicate by saying things like "I don't know for sure". But apparently you don't know either, how else to explain why you keep quoting the HTTP and URI specs at me as if they had anything to do with this. Yes, Text::CSV will fail on this case; I'll give you that (oh, no I made a mistake -- the world will end now).
(*) we'll let the peanut gallery judge who in this thread is deathly afraid of being occasionally wrong about stuff.