I found some time back problems with NiceSlice. Actually, with
Filter::Simple (used by default by NiceSlice, though it can use other
options, controlled with environment variables). I vaguely recall that
two slashes, as in two divisions consecutive, confuse it completely,
as they seem as regular expression.
I found this in my notes of 2022-11-05:
-------
Make a filter:
package MyFilter;
use v5.36;
use Filter::Simple;
FILTER_ONLY
code_no_comments => sub { say "Code:\n$_" },
all => sub { say "All:\n$_" };
1;
And a program:
use v5.36;
use lib ".";
use MyFilter;
my $x=1;
say $x/2/3;
Execution yields:
Code:
my $x=1;
say $x3;
All:
my $x=1;
say $x/2/3;
0.166666666666667
This means that /2/ is removed incorrectly. The name of the variable
($x and not $y) seems important.
-----------
Regards,
Luis
On Sun, Jan 07, 2024 at 12:01:27PM +1100, Karl Glazebrook via pdl-general wrote:
>
>
> > On 7 Jan 2024, at 11:55 am, Karl Glazebrook via pdl-general
> > <[email protected]> wrote:
> >
> > (The mismatch of line numbers seems to be related to the use of hereto text
> > earlier in the code, the debugger shows different line numbers)
> >
>
>
> PS just to prove this point given the line numbers issue:
>
>
>
>
> syntax error at /Users/karl/Software/perl/KGB/Redshift.pm line 251, near
> "$FOO("
> Execution of /Users/karl/Software/perl/KGB/Redshift.pm aborted due to
> compilation errors.
>
>
>
> You can see FOO triggers a compilation error and BAR does not, use
> PDL::NiceSlice is way at the top of the module
>
> Karl
>
> _______________________________________________
> pdl-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pdl-general
--
o
W. Luis Mochán, | tel:(52)(777)329-1734 /<(*)
Instituto de Ciencias Físicas, UNAM | fax:(52)(777)317-5388 `>/ /\
Av. Universidad s/n CP 62210 | (*)/\/ \
Cuernavaca, Morelos, México | [email protected] /\_/\__/
GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16 C2DF 5F0A C52B 791E B9EB
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general