Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: CGI.pm tag attributes and underscores

by trammell (Priest)
on Dec 15, 2004 at 21:29 UTC ( #415197=note: print w/ replies, xml ) Need Help??


in reply to CGI.pm tag attributes and underscores

I found this in perldoc CGI:

Many routines will do something useful with a named argument that it doesn't recognize. For example, you can produce non-standard HTTP header fields by providing them as named arguments: print $q->header(-type => 'text/html', -cost => 'Three smackers', -annoyance_level => 'high', -complaints_to => 'bit bucket'); This will produce the following nonstandard HTTP header: HTTP/1.0 200 OK Cost: Three smackers Annoyance-level: high Complaints-to: bit bucket Content-type: text/html Notice the way that underscores are translated automatically into hyphens. HTML-generating routines perform a different type of translation.


Comment on Re: CGI.pm tag attributes and underscores
Download Code
Re^2: CGI.pm tag attributes and underscores
by Hero Zzyzzx (Curate) on Dec 16, 2004 at 02:14 UTC

    This is a solved issue, but to reply to your question: I've read and referred to the CGI docs probably hundreds of times. I feel I've got a pretty good grasp on most everything the module does.

    My question was specifically about how one would control/turn off the "underscore to hyphen" translation. Thanks, though!

    -Any sufficiently advanced technology is
    indistinguishable from doubletalk.

    My Biz

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2014-11-24 04:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (135 votes), past polls