On 9/19/06, via RT Paul Cochrane <[EMAIL PROTECTED]> wrote:
# New Ticket Created by "Paul Cochrane"
# Please include the string: [perl #40361]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=40361 >
This is a patch of more Perl files that I missed with my previous
patch concerning the perl coding standards coda (the last patch was
only .pl files, this one patches as many of the .t files that I could
find). Some of the files affected by this patch have also been
converted from dos to unix line endings. I've also noticed some test
files that are Perl but don't have the shebang line; should this line
be in all Perl files and therefore be a Cage task?
thanks for the comprehensive patch work! i'm hesitant to apply this
one, though, for a few reasons.
firstly, line endings are unrelated to this effort and should be a
separate patch. that's no biggie, and alone wouldn't stop me from
applying.
more importantly, perl test files simply cannot be limited to 100
character lines, for reasons i'll explain in a moment. the vim coda
does not specify a max line length, but it seems the emacs coda does,
if i interpret 'fill-column: 100' correctly. (please correct me if i'm
wrong, emacs users of the world) *vim rocks* ;-)
test functions require ordered parameters (instead of unordered, named
params--something not familiar in perl testing anyway.) the suite also
makes liberal use of heredocs, the first of which (due to a perl5
limitation) *always* begins immediately after the first newline. that
is:
pir_output_is(<<$pre.'CODE'.$post,<<'OUTPUT','some really long but
necessary and comprehensive test description');
may exceed 100 characters. it seems foolish to me to make a test
developer code around this by creating a $description variable and
stuffing the contents of the description in a separate line of code.
therefore, i'm invoking the "exceptional circumstances" clause in the
definition of "must" in pdd07 for parrot tests written in perl.
for similar reasons, it's not welcome to allow an editor to modify
spaces to tabs, as they may be important in the test. this
circumstance is more unusual, and can possibly be limited to specific
test files (t/compilers/pge in particular.)
oh, one more small nit: the coda you specified did not match the
indentation of the coda in pdd07. again, i'm not an emacs user, so i
don't know if this has any effect (probably not) but i'd hate to apply
it and have to apply a fix later.
this can be resolved (and the patch applied) if the minor nits are
fixed, and i'm told that the emacs coda does not limit the line
length, or the line length part of the coda is removed, or chip tells
me to stuff it and make the test files conform to the standard. as for
space/tab issues, we can deal with them on a file-by-file basis.
oh, and yes, i believe the shebang should be in all perl files... but
this isn't specified *yet* in pdd07. if you can enter the ticket, that
would be fantastic, and we'll get a ruling from chip.
~jerry