On Sat, May 18, 2019 at 03:10:30AM +0200, Charlene Wendling wrote: > Hi ports, > > While working on an update for devel/p5-Term-ReadLine-Gnu, i've found > out many issues with this port: > > - HOMEPAGE and MASTER_SITES are pointing to a dead domain name > > It's available on metacpan, so i've switched to MODULES=cpan, > that will deal with all distribution issues for us in 1 line. > > - it uses features deprecated since Perl 5.22, like using defined() > against arrays [0], and arrays as references [1]. > > While [0] was a blocker for tests, [1] was spotted straight > after issuing 'psh'. > > I've fixed these issues, the runtime is now as expected. > > Comments/feedback are welcome!
Thanks for the new patches! (not sure anyone actually uses this so it might be a candidate to be tedu'd though) OK afresh1@ > > Charlène. > > > [0] > https://perldoc.perl.org/5.22.0/perldelta.html#defined(%40array)-and-defined(%25hash)-are-now-fatal-errors > [1] > https://perldoc.perl.org/5.22.0/perldelta.html#Using-a-hash-or-an-array-as-a-reference-are-now-fatal-errors > > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/shells/perlsh/Makefile,v > retrieving revision 1.11 > diff -u -p -u -p -r1.11 Makefile > --- Makefile 17 Jun 2017 01:31:46 -0000 1.11 > +++ Makefile 18 May 2019 00:37:59 -0000 > @@ -4,15 +4,15 @@ COMMENT= Perl shell > > DISTNAME= psh-1.8.1 > PKGNAME= ${DISTNAME:S/p/perl/} > -REVISION= 1 > +REVISION= 2 > CATEGORIES= shells > > -HOMEPAGE= http://www.focusresearch.com/gregor/sw/psh/ > - > -# perl > +# Perl > PERMIT_PACKAGE_CDROM= Yes > > -MASTER_SITES= http://www.focusresearch.com/gregor/download/ > +MODULES= cpan > + > +CPAN_AUTHOR= GREGOR > > RUN_DEPENDS= devel/p5-Term-ReadLine-Gnu \ > devel/p5-Term-ReadLine-Perl \ > Index: patches/patch-lib_Psh_Strategy_Executable_pm > =================================================================== > RCS file: patches/patch-lib_Psh_Strategy_Executable_pm > diff -N patches/patch-lib_Psh_Strategy_Executable_pm > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-lib_Psh_Strategy_Executable_pm 18 May 2019 00:37:59 > -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +Arrays can't be used as references since Perl 5.22. > + > +Index: lib/Psh/Strategy/Executable.pm > +--- lib/Psh/Strategy/Executable.pm.orig > ++++ lib/Psh/Strategy/Executable.pm > +@@ -24,7 +24,7 @@ sub runs_before { > + } > + > + sub applies { > +- my $com= @{$_[2]}->[0]; > ++ my $com= ${$_[2]}[0]; > + my $executable= Psh::Util::which($com); > + return $executable if defined $executable; > + return ''; > Index: patches/patch-lib_Psh_pm > =================================================================== > RCS file: patches/patch-lib_Psh_pm > diff -N patches/patch-lib_Psh_pm > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-lib_Psh_pm 18 May 2019 00:37:59 -0000 > @@ -0,0 +1,16 @@ > +$OpenBSD$ > + > +defined() used against arrays is fatal since Perl 5.22 > + > +Index: lib/Psh.pm > +--- lib/Psh.pm.orig > ++++ lib/Psh.pm > +@@ -367,7 +367,7 @@ sub find_array_name { > + > + sub defined_and_nonempty > + { > +- if (!defined(@_)) { return 0; } > ++ if (!@_) { return 0; } > + if (scalar(@_) == 0) { return 0; } > + > + if (scalar(@_) == 1) { > > -- andrew - http://afresh1.com Speed matters. Almost as much as some things, and nowhere near as much as others. -- Nick Holland
