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

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

Thread Previous
From:
Nicholas Clark
Date:
December 13, 2000 02:38
Subject:
Re: =code language ... =back in POD
Message ID:
20001213103748.A44203@plum.flirble.org
On Tue, Dec 12, 2000 at 09:29:39PM +0000, Simon Cozens wrote:
> On Tue, Dec 12, 2000 at 07:16:36PM +0000, Nicholas Clark wrote:
> > > Which Perl?  I have several different versions installed.  
> > 
> > =code perl -M-strict >5.5
> 
> Irrelevant. If we're using this to mark up pod/perlfoo.pod shipped with Perl
> version x.y.z, it should work with Perl version x.y.z.

Agree with the sentence. If it's given as an example that works, it *must*
work with that version. But I don't agree that it's irrelevant to check
it against other versions

1: For systems with multiple versions installed, the man page
   documentation all sits in the same place. Which means that if perl 5.7
   is installed but /usr/bin/perl is 5.6 (or earlier) man perl (probably)
   brings up perl 5.7. Which makes it frustrating if the examples in that
   don't work with the perl that you're using.
2: Arguably the above is a broken system. So you fix it.
   As a person writing a perl script or module, using the man page for
   reference, it's nice to know that the example you're following isn't
   portable to an earlier version. (before somebody finds out by trying it)
   Or, more realistically, as the man page writer it's better to know
   that your example doesn't work on earlier perls, so that you can
   either warn your readers that it's not a portable construction, or
   make a trivial adjustment (if viable) to make it one.
3: Writers of modules not in the core distribution would find it useful
   to know where their code examples didn't work.

I get the impression that outside p5p "perl" is "perl"
(hell, perl is 4.036 and perl5 is something new, but at least whichever
BSD I was using now ships perl5 as /usr/bin/perl)

I got a comment back that a .sig I used to use didn't work. It needed
perl5, and that person had tried it on perl4. My code was broken as far
as he was concerned.  Subtle distinctions about versions are lost - out
there code for perl should work on perl. And even if it's the user being
stupid, they still blame perl. Which doesn't look good for perl.

Nicholas Clark

Thread Previous


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