On 9/19/06, Paul Cochrane <[EMAIL PROTECTED]> wrote:
> 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. I can do that in a separate patch if you want. That's not a major problem, and probably a good idea.
wonderful.
<snip - tests and coda> I'd not realised some of the issues you brought up (e.g. extra long lines, tabs etc.) and I would say it would be a good idea not to apply the patch. I've noticed that I should have added the coda to the .pm files as well, so it's definitely a good idea not to apply the patch.
ok, glad you agree :)
I've got a couple of questions concerning perl files in the parrot source tree: It's obvious that .pl and .pm files are perl, however, some of the .t files are perl and some are parrot. Is there an easy way to make a distinction between .t files as to what is actually running the test? One could test for the perl shebang line, however, since that's not in there in all the files necessarily one can't use that (also it might be a good idea to make a test for the shebang line in perl .t files anyway, so one can't really have another test relying on the shebang line). So, how in general can one decide if a file is perl? It is easy to check for c files and headers (this is done in Parrot::Distribution, which the code_coda.t test is based on, and which I'm trying to see how to extend to perl) via the file's extension, but one can't do this for perl beyond .pl and .pm (have I missed any others?). Should one have a list of directories which are just perl files? This would seem too restrictive to me as then parrot-run tests and perl-run tests couldn't reside in the same directory. Can one have a mime type of some description and then let svn work it out? I'm not sure how to achieve this in general. Any ideas of a good solution to extend Parrot::Distribution and therefore code_coda.t?
i suggest that all .t files must have a shebang line. this is how parrot's test engine determines what program should be used to run the tests. on unix, the shell reads the shebang, and on windows, perl reads the shebang, and calls the appropriate program. therefore, in order to work correctly: ~ all non-perl test files must have a shebang i strongly suggest that this be extended to cover all test files. then, as you say, it can easily be tested, and it's value can be used in other tests to determine it's file type. if you wish to submit a patch to implement this (and one to test it would be wonderful too,) i'll happily apply, and we'll patch up pdd07 real soon now.
> 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. Ok, I'll add a ticket (it'll give me good experience with RT :-) ).
yay!
Thanks heaps for your feedback!
anytime, paul. thanks so much for keeping our bird clean. ~jerry