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

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

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
December 12, 2000 11:22
Subject:
Re: =code language ... =back in POD
Message ID:
20001212192248.L91652@plum.flirble.org
On Tue, Dec 12, 2000 at 01:15:01PM -0600, Jarkko Hietaniemi wrote:

> Also, no matter what the language, yet another problem quickly becomes
> apparent if you really start doing something like the suggestion (I
> one actually did, ahem...)  The suggested model assumes each of the
> code snippets are both self-contained and correct.  The first
> assumption will trip us if a later snippet requires something from
> previous snippets to compile.  The second assumption: how does one

in which case I guess that you don't flag those snippets with
=code and they get ignored.

> demonstrate *illegal* code if the requirement is that each code
> snippet should compile okay? (whatever that means for shells,
> I don't know)

how about

This won't work

=code !perl -Mstrict

    $c = 4

=back

but this will

=code perl -Mstrict

    $a = 4

=back


there may well be better syntax suggestions. I'm not typing much more
slowly than I'm thinking.

Nicholas Clark

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