Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: img function in CGI.pm

by Anonyrnous Monk (Hermit)
on Feb 09, 2011 at 17:01 UTC ( #887238=note: print w/ replies, xml ) Need Help??


in reply to img function in GGI.pm

td(img({-src=>'/css/ico/notepencil32.png', -alt=>'ahoj', -height=>'23' +, -width=>'23' -id=>'myid'})) + ^

You omitted the comma (so you're subtracting 'id' from 23...).

With warnings on, you'd have gotten "Argument "id" isn't numeric in subtraction (-) at ..."

Update: ...and this is for the downvoter, who was apparently too lazy to test himself:

$ perl -wMCGI=:standard -le"print img({-src=>'/css/ico/notepencil32.pn +g', -alt=>'ahoj', -height=>'23', -width=>'23', -id=>'myid'})" <img height="23" src="/css/ico/notepencil32.png" id="myid" width="23" +alt="ahoj" />


Comment on Re: img function in CGI.pm
Select or Download Code
Re^2: img function in CGI.pm
by kosta (Sexton) on Feb 09, 2011 at 19:39 UTC
    oh gosh oh gosh! It is always the little things that get me. Always! In some ways I love vim, I hate it in others (would have never happened with eclipse)

      It would have been obvious with better layout in emacs with any perl mode too because the indentation breaks. I suspect vim has similar behavior. So just changing to shorter, more legible line widths will help on a couple of levels-

      img({ -src=>'/css/ico/notepencil32.png', -alt=>'ahoj', -height=>'23', -width=>'23' -id=>'myid'})

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2015-07-07 08:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls