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

Attachment: S02.patch
Description: Binary data

Reply via email to