Skip to content

Handle Perl 5.42 stricter strict refs by avoiding deref'ing scalar 0.#686

Open
sjuxax wants to merge 2 commits into
oetiker:masterfrom
sjuxax:fix/perl-5.42-strictrefs
Open

Handle Perl 5.42 stricter strict refs by avoiding deref'ing scalar 0.#686
sjuxax wants to merge 2 commits into
oetiker:masterfrom
sjuxax:fix/perl-5.42-strictrefs

Conversation

@sjuxax
Copy link
Copy Markdown

@sjuxax sjuxax commented Mar 18, 2026

We get output like this otherwise:

Broken on Perl 5.42:

znapzend on  fix/perl-5.42-strictrefs [!?] via 🐪 v5.42.0
at 22:25:36 ❯ znapzendzetup edit zs/work
Can't use string ("0") as an ARRAY ref while "strict refs" in use at /usr/bin/znapzendzetup line 261.

Fixed:

znapzend on  fix/perl-5.42-strictrefs [!?] via 🐪 v5.42.0
at 22:26:09 ❯ bin/znapzendzetup edit zs/work
ERROR: cannot get backup config

@oetiker oetiker requested a review from Copilot April 21, 2026 17:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread bin/znapzendzetup
my $backupSets = $zConfig->getBackupSet(0, 0, $opts->{src})
or die "ERROR: cannot get backup config\n";
my $backupSet = $backupSets->[0]
or die "ERROR: cannot get backup config\n";
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the second case can never be true. please drop it too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants