Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Re: Multiline comments

by dimar (Curate)
on Jun 05, 2004 at 19:02 UTC ( #361652=note: print w/replies, xml ) Need Help??

in reply to Multiline comments

It's time for @#$! multiline comments in perl!

Yeah yeah, I know ...

  • use 'here docs' (poor option)
  • use 'POD' (interferes with docs and no indenting)
  • use 'ACME::Comment' (requires module install rights)
  • use the 'q' operator (unsuitable for serious use)

q`<!-- --------------------------- <region-function_docs> main: - name : DoFoo desc : do some foo usage: DoFoo($optional_greeting); </region-function_docs> --------------------------- -->`if(000); sub DoFoo{ my $optional_greeting = shift || 'Hello World'; print "$optional_greeting\n"; print "we are now doing foo\n"; print "\n"; }###end_sub

So just write your code like that and problem (solved?).

Update: this workaround option parses free of warnings and errors, but is unsuitable for serious use in perl.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2022-09-25 00:48 GMT
Find Nodes?
    Voting Booth?
    I prefer my indexes to start at:

    Results (116 votes). Check out past polls.