develooper Front page | perl.perl6.language | Postings from April 2012

Re: [perl6/specs] 6ef69b: pod vars are now lowercase as seen in 3e1a9a5a576b...

Thread Previous | Thread Next
From:
herbert breunung
Date:
April 5, 2012 10:14
Subject:
Re: [perl6/specs] 6ef69b: pod vars are now lowercase as seen in 3e1a9a5a576b...
Message ID:
4F7DD20C.1030805@web.de
Thank you damian, i will apply that patch,


> Herbert Breunung asked:
> 
>> what was you rational behind this decision.
>> I like it visually but my brain refuses to find any logic why only there
>> special vars should be different.
> 
> This change stems from another change that we made after discussions at
> YAPC Riga last year. That change was to convert the =DATA and =END
> markers to =data and =finish.
> 
> The rationale for that change was as follows...
> 
> In the original redesign for Pod6, every built-in directive (=begin,
> =head1, =item, =table, etc.) was lower-case...except for =DATA and =END,
> which retained their vestigal upper-casing, in analogy to Perl 5's
> __DATA__ and __END__.
> 
> And in the original Pod6 design, every upper-case directive (=SYNOPSIS,
> =AUTHOR, =COPYRIGHT, etc.) was a "semantic block"....except for =DATA
> and =END, which were built-ins.
> 
> In other words, =DATA and =END were violating both the syntax for
> built-ins (should be lower-case, but aren't) and the semantics
> of upper-case (should be semantic blocks, but aren't).
> 
> So we changed them to what the syntax and semantics were telling us they
> should be: lower-case.
> 
> But this change broke the one-to-one mapping between Pod sections and
> Pod-access variables. Previously it was:
> 
>     =pod        <----->   $=pod
>     =UserDef    <----->   $=UserDef
>     =SYNOPSIS   <----->   $=SYNOPSIS
>     =DATA       <----->   $=DATA
> 
> But, after the Riga discussions it became:
> 
>     =pod        <----->   $=pod
>     =UserDef    <----->   $=UserDef
>     =SYNOPSIS   <----->   $=SYNOPSIS
>     =data       <----->   $=DATA   (oops!)
> 
> Now, this second change simply restores balance to the Force:
> 
>     =pod        <----->   $=pod
>     =UserDef    <----->   $=UserDef
>     =SYNOPSIS   <----->   $=SYNOPSIS
>     =data       <----->   $=data
> 
> 
> Note too that, under the current notion that *any* Pod block
> (say: =foo or =BAR) is available under a variable of its own name
> (i.e. $=foo and $=BAR), then $=DATA is still a valid variable. It does
> not, however, access the built-in "data block" named =data. Instead, it
> accesses the (potential) semantic block named =DATA...which is an
> entirely different beastie.
> 
> 
> BTW, S02 still has remnant mentions of $=POD and $=DATA, as well as some
> other "antiquities" regarding Pod variables. I have attached a proposed
> docpatch.
> 
> 
> Damian


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