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

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

Thread Previous | Thread Next
From:
barries
Date:
December 15, 2000 07:51
Subject:
Re: =code language ... =back in POD
Message ID:
20001215105058.C3297@jester.slaysys.com
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:

   http://dev.perl.org/rfc/11.pod

A concept implemetation is at:

   http://slaysys.com/src/Pod-StdParser-0.001.tar.gz

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...

=cut



- Barrie

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About