Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) 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.




  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-03-28 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found