I hit another NiceSlice bug. I'm attaching a small perl program. It should "perl -c" just fine, however:
dima@shorty:/tmp$ perl -c /tmp/niceslice_significantcomment.pl
Possible unintended interpolation of @x in string at /tmp/niceslice_significantcomment.pl line 10.
syntax error at /tmp/niceslice_significantcomment.pl line 9, near "1:"
Global symbol "@x" requires explicit package name at /tmp/niceslice_significantcomment.pl line 10.
/tmp/niceslice_significantcomment.pl had compilation errors.
Surprisingly enough, the culprit is the comment on line 6. This is confusing NiceSlice. Removing that comment makes it work.
I don't see the attachment but the current PDL::NiceSlice filter doesn't ignore quoted strings or comments. NiceSlice-ish code in them are filtered or can confuse the filter. I have worked out the various issues but ran into various snags in implementation (some from bugs in needed dependencies and some from how to support niceslice filtering in the PDL shells) so it did not make the cut for PDL-2.006.
OK; it sounds like you're already familiar with these issues already. I'll attach the sample file anyway (I did attach it when posting; maybe SF is confused).
Thanks.
Modifying your example to actually do something:
and this is with the current Filter::Util::Call sourcefilter engine:
BUT this is with the current Filter::Simple engine which is mostly working:
Voila! It mostly works but not yet 100%. Nor does it work in the PDL shells.
--Chris
The default engine for PDL::NiceSlice is now set to Filter::Simple to exercise the functionality. Still need an implementation that works for string/eval processing rather than just for source files.
Would like to see this closed for PDL-2.008
Lower priority to 4. Plan to complete development in PDL-2.009 release cycle.
This matter will now be tracked at https://github.com/PDLPorters/pdl/issues/32