Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

NiceSlice code with dubious "=over" fails in 2.080

Open
#406 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
perl
Domain
tooling

Research direction

Start with the minimal test case in test_ns.pm and run make test on the reported PDL 2.080 setup. Read the PDL::NiceSlice handling around the =over/=cut block and the commented braces, then compare behavior with 2.079 and the installed Text-Balanced 2.06. Done means the example and the affected test suite pass without breaking NiceSlice parsing.

Written by the indexing model from the issue text.

Description

HI Ed,
make test fails with NiceSlice errors, so do a lot of programs. Both latest git as from CPAN.
2.079 still works.
Is this maybe related to Text-Balanced? Installed version is 2.06. Debian linux.

Here's a quite minimal example. I think it has to do with ( ) or {} in comments.

PDL 2.080: perl -Mblib -e "use test_ns; "

syntax error at /home/ingo/perl/test_ns.pm line 24, near "$iii("
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

PDL 2.079: perl -Mblib -e "use test_ns; "

syntax error at /home/ingo/perl/test_ns.pm line 24, near "$iii("
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

test_ns.pm:

#!/usr/bin/perl  

package test_ns;
use PDL;
use PDL::NiceSlice;

=over
sub fmod {
        my $x=shift;
        my $y=shift; 
        my $n=floor $x/$y; 
        return $x-$n*$y;
}


sub amp {
        my $i=shift; 
        return (sqrt($i((0),)**2+$i((1),)**2));
}
=cut

sub phase {
        my $iii=shift;
        return (atan2($iii((1),),$iii((0),)));
}

# { 
# #} sMDH;                                        // total length: 32 * 32 Bit (128 Byte)            128
#

1;
Dominant language
Perl
Stars
105
Forks
49
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PDLPorters/pdl

All issues in PDLPorters/pdl

Similar issues

More Perl issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.