develooper Front page | perl.perl5.porters | Postings from July 2011

Re: [PATCH] [DOCS] Modernize perlopentut.pod

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
July 24, 2011 12:33
Subject:
Re: [PATCH] [DOCS] Modernize perlopentut.pod
Message ID:
F72E09AA-41FA-4A42-B2B1-5C4FA6C8FF88@cpan.org
Jesse Vincent wrote:
> On Wed, Jul 20, 2011 at 10:10:27AM -0600, Karl Williamson wrote:
> > I believe the 3-argument open should be the one stressed in a tutorial.
> 
> +1
> 
> 2-arg open can be used correctly, but is easier to screw up. We don't
> need to teach people all the ways to do it in an intro tutorial. We 
> need to teach them at least one good way to do it and to point them
> toward the reference documentation that explains all the rope a given
> feature provides and explains all the variant forms they might encounter
> in the wild.  If perlopentut were the only place we documented two-arg
> open, we'd be in a lot of trouble. Thankfully, it's not.
> 
> Perl's built in tutorial documentation should steer new users in a
> reasonable direction and provide them with the tools they need to
> write good Perl code.  When a tutorial tries to be exhaustive, it ends
> up exhausting and often fails at its primary goal. 

I learnt Perl’s open function from perlopentut. I did not find it at all exhausting, but engaging. I think it would be a pity to lose the gentle-introduction-style explanation of the advanced features, as it is still much easier to read than the reference documentation. Also, since there are clearly-defined sections, one can easily skip over some in the first reading.

Also, everyone seems to have a different idea of what a tutorial is. As someone pointed out, maybe it’s the name that’s the problem.

Or maybe we should go the route of perlre*:

perlrequick - quick start
perlretut - more comprehensive tutorial

perlopenquick - quick start
perlopentut - more comprehensive tutorial

> Similarly, I don't think perlopentut.pod should cover one-arg open.
> 
> On an almost-related note, I can foresee a future where a program running
> in a lexical scope declared to be v5.30 (or whatever) doesn't have 2-arg
> open available to it, but that's neither here nor there[1].
> 
> Best,
> Jesse
> 
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