Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^3: Style in CGI Header

by Anonymous Monk
on Oct 01, 2014 at 01:20 UTC ( [id://1102500]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Style in CGI Header
in thread Style in CGI Header

There are some kinds of changes where you won't know if they work until you try it on a test system... or in this case a live system... this isn't one of them. CGI is (still) in the Perl core, so this one is particularly easy to test locally.

use CGI ':standard'; my @cssFiles = ("src1"); push @cssFiles, "src2"; print start_html(-style=>{-code=>"code",-src=>\@cssFiles}); __END__ ... <link rel="stylesheet" type="text/css" href="src1" /> <link rel="stylesheet" type="text/css" href="src2" /> <style type="text/css"> <!--/* <![CDATA[ */ code /* ]]> */--> </style> ...

So that's a yes, frozenwithjoy's suggestion should work, provided you use an array reference (-src=>\@cssFiles, not -src=>@cssFiles).

If you had a test system, even if it's not an exact mirror of the live system but at least can execute your code, may have saved you the ~20 hours wait on a solution...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-24 13:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found