Skip Menu |
Report information
Id: 127060
Status: resolved
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: rjbs <rjbs [at] cpan.org>
Cc:
AdminCc:

Operating System: darwin
PatchStatus: (no value)
Severity: low
Type: core
Perl Version: 5.23.3
Fixed In: (no value)



CC: rjbs [...] cpan.org
From: rjbs [...] cpan.org
Date: Mon, 28 Dec 2015 15:34:12 -0500 (EST)
To: perlbug [...] perl.org
Subject: remove deprecated *glob{FILEHANDLE}
This is a bug report for perl from rjbs@cpan.org, generated with the help of perlbug 1.40 running under perl 5.23.3. ----------------------------------------------------------------- [Please describe your issue here] Using *glob{FILEHANDLE} instead of *glob{IO} was intended to be deprecated in 1996 or so, but it didn't done until 39b99f2, in Sep, 2001. This behavior has been issuing a warning since then, and it has been default-on since 5.12.0 in April 2010. I'm not sure there's an obvious way forward here, but I would like to figure out whether we can (should?) try to close out all our longstanding deprecations. 1) drop the behavior entirely, letting it return undef like any other unknown glob entry 2) make it fatal 3) leave it warning but working [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=low --- Site configuration information for perl 5.23.3: Configured by rjbs at Mon Sep 21 11:54:00 EDT 2015. Summary of my perl5 (revision 5 version 23 subversion 3) configuration: Platform: osname=darwin, osvers=14.5.0, archname=darwin-2level uname='darwin jubjub.local 14.5.0 darwin kernel version 14.5.0: wed jul 29 02:26:53 pdt 2015; root:xnu-2782.40.9~1release_x86_64 x86_64 ' config_args='-Dprefix=/Users/rjbs/.plenv/versions/23.3 -de -Dusedevel -A'eval:scriptdir=/Users/rjbs/.plenv/versions/23.3/bin'' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -I/opt/local/include', optimize='-O3', cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -I/opt/local/include' ccversion='', gccversion='4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector-strong -L/usr/local/lib -L/opt/local/lib' libpth=/usr/local/lib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.0/lib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib /usr/lib /opt/local/lib libs=-lpthread -lgdbm -ldbm -ldl -lm -lutil -lc perllibs=-lpthread -ldl -lm -lutil -lc libc=, so=dylib, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib -fstack-protector-strong' --- @INC for perl 5.23.3: /Users/rjbs/.plenv/versions/23.3/lib/perl5/site_perl/5.23.3/darwin-2level /Users/rjbs/.plenv/versions/23.3/lib/perl5/site_perl/5.23.3 /Users/rjbs/.plenv/versions/23.3/lib/perl5/5.23.3/darwin-2level /Users/rjbs/.plenv/versions/23.3/lib/perl5/5.23.3 . --- Environment for perl 5.23.3: DYLD_LIBRARY_PATH (unset) HOME=/Users/rjbs LANG=en_US.UTF-8 LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/Users/rjbs/.plenv/versions/23.3/bin:/Users/rjbs/.plenv/libexec:/Users/rjbs/.plenv/plugins/perl-build/bin:/Users/rjbs/bin:/Users/rjbs/.rbenv/shims:/Users/rjbs/.rbenv/bin:/Users/rjbs/.rakudobrew/bin:/Users/rjbs/.plenv/shims:/Users/rjbs/.plenv/bin:/opt/local/bin:/opt/local/sbin:/usr/local/texlive/2015/bin/x86_64-darwin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/rjbs/code/hla PERLDOC=-otext PERL_AUTOINSTALL=--skipdeps PERL_BADLANG (unset) PERL_MAILERS=sendmail:/Users/rjbs/bin/sendmail SHELL=/opt/local/bin/zsh
Date: Mon, 28 Dec 2015 23:04:39 +0100
Subject: Re: [perl #127060] remove deprecated *glob{FILEHANDLE}
To: perl5-porters [...] perl.org
From: Abigail <abigail [...] abigail.be>
Download (untitled) / with headers
text/plain 2.2k
On Mon, Dec 28, 2015 at 12:34:32PM -0800, Ricardo SIGNES wrote: Show quoted text
> # New Ticket Created by Ricardo SIGNES > # Please include the string: [perl #127060] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=127060 > > > > This is a bug report for perl from rjbs@cpan.org, > generated with the help of perlbug 1.40 running under perl 5.23.3. > > > ----------------------------------------------------------------- > [Please describe your issue here] > > Using *glob{FILEHANDLE} instead of *glob{IO} was intended to be > deprecated in 1996 or so, but it didn't done until > 39b99f2, in Sep, 2001. > > This behavior has been issuing a warning since then, and it has been > default-on since 5.12.0 in April 2010. > > I'm not sure there's an obvious way forward here, but I would like to > figure out whether we can (should?) try to close out all our > longstanding deprecations. > > 1) drop the behavior entirely, letting it return undef like any other > unknown glob entry > > 2) make it fatal > > 3) leave it warning but working >
There's also a fourth option: 4) drop the warning, and leave it working. If it was intended to be deprecated almost 20 years ago, and was deprecated for more than 14 years, then what's the point? Whatever itch was annoying people back then doesn't seem to require much scratching nowadays. I think having something deprecated for a long time, but all what's being done is having a deprecation warning is bad for perl. On the one hand, there's no gain, as the feature (and hence the code) is still there. On the other hand, you're needlessly annoying the user, forcing her to change her code for no other reason than silencing a warning. IMO, if something is deprecated, there should be a date attached. By that date, either the feature is really gone (and hence, the benefit of deprecating it can be reaped), or the feature should be undeprecated again (that is, supported again). Labelling features as deprecated, but then not deprecating them, will cause people to ignore or silence deprecation warnings, as their experience will learn them they aren't serious. And then people will get bitten if some features do get deprecated. If p5p doesn't take deprecation warnings seriously, why should users? Abigail
Subject: Re: [perl #127060] remove deprecated *glob{FILEHANDLE}
Date: Mon, 28 Dec 2015 17:13:27 -0500
To: Abigail via RT <perlbug-followup [...] perl.org>
From: Ricardo Signes <rjbs [...] cpan.org>
Download (untitled) / with headers
text/plain 1.3k
* Abigail via RT <perlbug-followup@perl.org> [2015-12-28T17:05:25] Show quoted text
> There's also a fourth option: > > 4) drop the warning, and leave it working. > > If it was intended to be deprecated almost 20 years ago, and was > deprecated for more than 14 years, then what's the point? Whatever > itch was annoying people back then doesn't seem to require much > scratching nowadays.
Yeah, and I think this is a pretty reasonable option. I meant to include it, which is why I started with "close out" deprecations -- I just don't want them hanging open forever. *glob{FILEHANDLE} irritates me, but only when I notice that it's there. Is there some benefit to getting rid of it? "It helps avoid confusion" might be true in some sense, but it's undercut by the confusion that will be introduced by existing working code failing. Show quoted text
> IMO, if something is deprecated, there should be a date attached. > By that date, either the feature is really gone (and hence, the benefit > of deprecating it can be reaped), or the feature should be undeprecated > again (that is, supported again).
I agree, generally. Even if there is no date, it should be revisited regularly. "my variable in false conditional" is an example where the deprecation seems likely to linger intentionally. Show quoted text
> If p5p doesn't take deprecation warnings seriously, why should users?
Agreed, and that's why I brought this up! -- rjbs
Download signature.asc
application/pgp-signature 473b

Message body not shown because it is not plain text.

To: perl5-porters [...] perl.org
From: Aristotle Pagaltzis <pagaltzis [...] gmx.de>
Subject: Re: [perl #127060] remove deprecated *glob{FILEHANDLE}
Date: Thu, 31 Dec 2015 16:22:34 +0100
Download (untitled) / with headers
text/plain 658b
* Abigail <abigail@abigail.be> [2015-12-28 23:05]: Show quoted text
> There's also a fourth option: > > 4) drop the warning, and leave it working.
4b) but document it as discouraged Show quoted text
> If it was intended to be deprecated almost 20 years ago, and was > deprecated for more than 14 years, then what's the point?
It’s probably one of these things that fell merely under “we don’t like this”, and happened before discouraged-vs-deprecated was distinguished. Show quoted text
> I think having something deprecated for a long time, but all what's > being done is having a deprecation warning is bad for perl.
Yeah. Regards, -- Aristotle Pagaltzis // <http://plasmasturm.org/>
Date: Thu, 31 Dec 2015 22:13:22 -0500
From: Ricardo Signes <perl.p5p [...] rjbs.manxome.org>
Subject: Re: [perl #127060] remove deprecated *glob{FILEHANDLE}
To: Abigail <abigail [...] abigail.be>
CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 146b
* Abigail <abigail@abigail.be> [2015-12-28T17:04:39] Show quoted text
> 4) drop the warning, and leave it working.
Patch attached. Thoughts, folks? -- rjbs

Message body is not shown because sender requested not to inline it.

Download signature.asc
application/pgp-signature 473b

Message body not shown because it is not plain text.

RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 252b
On Thu Dec 31 19:13:48 2015, perl.p5p@rjbs.manxome.org wrote: Show quoted text
> * Abigail <abigail@abigail.be> [2015-12-28T17:04:39]
> > 4) drop the warning, and leave it working.
> > Patch attached. Thoughts, folks?
Looks good to me. -- Father Chrysostomos
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 248b
On Thu Dec 31 19:13:48 2015, perl.p5p@rjbs.manxome.org wrote: Show quoted text
> * Abigail <abigail@abigail.be> [2015-12-28T17:04:39]
> > 4) drop the warning, and leave it working.
> > Patch attached. Thoughts, folks? >
-- James E Keenan (jkeenan@cpan.org)
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 321b
On Thu Dec 31 19:13:48 2015, perl.p5p@rjbs.manxome.org wrote: Show quoted text
> * Abigail <abigail@abigail.be> [2015-12-28T17:04:39]
> > 4) drop the warning, and leave it working.
> > Patch attached. Thoughts, folks? >
Recommend including the RT number in inline comments and commit message. -- James E Keenan (jkeenan@cpan.org)
Subject: Re: [perl #127060] remove deprecated *glob{FILEHANDLE}
Date: Fri, 1 Jan 2016 16:33:04 +0100
CC: perl5-porters [...] perl.org
From: Abigail <abigail [...] abigail.be>
To: Ricardo Signes <perl.p5p [...] rjbs.manxome.org>
Download (untitled) / with headers
text/plain 746b
On Thu, Dec 31, 2015 at 10:13:22PM -0500, Ricardo Signes wrote: Show quoted text
> * Abigail <abigail@abigail.be> [2015-12-28T17:04:39]
> > 4) drop the warning, and leave it working.
> > Patch attached. Thoughts, folks?
Looks almost good to me: Show quoted text
> +between v5.8.0 and v5.22.0, it will issue a deprecation warning, but this
but this line suggests the warning is gone in 5.22.1, which I don't think it is. Perhaps some wording like: On perls since v.5.8.0, it will issue a deprecation warning, but this deprecation has been rescinded as of v5.23.0. Or use the more math-like open ended interval: On perls from v5.8.0, and before v5.23.0, it will ... Or perhaps the easiest is to drop the '.0' altogether, and just use 5.8 and 5.22. Abigail
RT-Send-CC: perl5-porters [...] perl.org
Thanks, applied as 83677dc5596295a5b5095063d96f95de3735933a. :-) -- rjbs


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org