develooper Front page | perl.perl5.porters | Postings from December 2000

Re: =code language ... =back in POD

Thread Previous | Thread Next
December 15, 2000 07:51
Re: =code language ... =back in POD
Message ID:
On Thu, Dec 14, 2000 at 10:53:05AM -1000, Tim Jenness wrote:
> Parsing is not the issue - that will work fine. If you want the examples
> to appear in any translated pod document you will have to make sure the
> translators treat it in a special way. Code examples that do not appear
> are not that helpful.

I ever so humbly put forth RFC11 for =also for, =also begin and
=also end:

A concept implemetation is at:

It's all about denoting that a stretch of POD is for the main body of
docuementation and "also for" some other translator, like a test suite
generator.  I'm not picky about the names, =also_for (note the '_') & co.
were also proposed.

=item run

=for test run.t
  #!perl -w
  use Test ;
  use IPC::Run qw( run ) ;
  $cmd = $^X ;
  @args = ( '-e', 'print "hello world\n"' ) ;
  ( $in, $out, $err ) = ('') x 3 ;
  plan tests => 2 ;

=also for test run.t
  $r = run( [$cmd, @args], \$in, \$out, \$err ) ;

=for test run.t
  ok( $out, "hello world\n" ) ;
  ok( $err, "" ) ;

The run() method blah, blah, blah...


- Barrie

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About