I suppose ignoring pod sections can in principle be done, Filter::Simple by 
David Conway has some suitable magic but that is over my regexp-head.

An easier approach would be to split a given pm-file into pure pod and pure 
code sections, e.g.

  podselect on XX.pm > XX.pod
  Pod::Strip on XX.pm > XX.pm

then run niceslicepp on code-only XX.pm, done.

Christian

On 27/09/2010, at 8:55 AM, Chris Marshall wrote:

> On 9/26/2010 3:43 PM, Christian Soeller wrote:
>> Well done Chris.
>> It would be nice to make this some kind of Makefile target,
> > so that you can do 'make distpp' or similar and get a dist
> > with perldlpp applied against (.pm?, others) files that match
> > a 'grep 'use PDL::NiceSlice'.
> 
> Yes, that was the hope.
> 
> One thing I noticed when testing this script was that
> the current NiceSlice filter doesn't ignore POD
> sections so that the docs for various NiceSlice
> usages ended up with nslice() in them....
> 
> --Chris
> 
>> On 27/09/2010, at 2:57 AM, Chris Marshall wrote:
>> 
>>> On 9/25/2010 5:26 PM, Chris Marshall wrote:
>>>> 
>>>>   
>>>> http://sourceforge.net/tracker/index.php?func=detail&aid=3074830&group_id=612&atid=350612
>>>> 
>>>> and I've implemented a simple off-line NiceSlice pre-processor
>>>> that you can run manually on the problem files (with PDL::NiceSlice
>>>> constructs in them) to remove the requirement for source filtering.
>>>> 
>>>> That should allow you to fix the *.pm files so that perlapp
>>>> can work (I hope).  See the above ticket for the list of
>>>> files that I found in the PDL tree that need to be filtered.
>>> 
>>> The perldlpp.pl script takes the name of the
>>> file to be filtered as a command line arg and
>>> it outputs the filtered result to STDOUT, e.g.
>>> 
>>>   perldlpp.pl file-w-niceslice.pm>  clean-file.pm
>>> 
>>> or (for win32)
>>> 
>>>   perl perldlpp.pl file-w-niceslice.pm>  clean-file.pm
>>> 
>>> Cheers,
>>> Chris

--
Christian Soeller PhD   Dept. of Physiology  +64 9 3737599 x82770
University of Auckland  Auckland, New Zealand  fax +64 9 3737499



_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to