Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] Indirect object syntax fixed in FileHandle.pm #15334

Closed
p5pRT opened this issue May 18, 2016 · 8 comments
Closed

[PATCH] Indirect object syntax fixed in FileHandle.pm #15334

p5pRT opened this issue May 18, 2016 · 8 comments
Labels

Comments

@p5pRT
Copy link

p5pRT commented May 18, 2016

Migrated from rt.perl.org#128178 (status was 'resolved')

Searchable as RT128178$

@p5pRT
Copy link
Author

p5pRT commented May 18, 2016

From cwhitener@gmail.com

This is a bug report for perl from cwhitener@​gmail.com,
generated with the help of perlbug 1.40 running under perl 5.25.1.


Simple update of FileHandle to no longer use indirect object syntax.

= new IO​::Handle; to = IO​::Handle->new;



Flags​:
  category=library
  severity=low
  Type=Patch
  PatchStatus=HasPatch
  module=FileHandle


Site configuration information for perl 5.25.1​:

Configured by cwhitener at Wed May 18 11​:58​:31 EDT 2016.

Summary of my perl5 (revision 5 version 25 subversion 1) configuration​:
  Derived from​: 9cd3bbf
  Platform​:
  osname=darwin, osvers=15.4.0, archname=darwin-2level
  uname='darwin macmini-4312.ad.infotechfl.com 15.4.0 darwin kernel version 15.4.0​: fri feb 26 22​:08​:05 pst 2016; root​:xnu-3248.40.184~3release_x86_64 x86_64 '
  config_args='-des -Dusedevel'
  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 -mmacosx-version-min=10.11 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -DPERL_USE_SAFE_PUTENV',
  optimize='-O3',
  cppflags='-fno-common -DPERL_DARWIN -mmacosx-version-min=10.11 -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
  ccversion='', gccversion='4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)', 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='cc', ldflags =' -mmacosx-version-min=10.11 -fstack-protector-strong -L/usr/local/lib'
  libpth=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/lib /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib /usr/local/lib /usr/lib
  libs=-lpthread -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=' -mmacosx-version-min=10.11 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector-strong'

Locally applied patches​:
  uncommitted-changes


@​INC for perl 5.25.1​:
  lib
  /usr/local/lib/perl5/site_perl/5.25.1/darwin-2level
  /usr/local/lib/perl5/site_perl/5.25.1
  /usr/local/lib/perl5/5.25.1/darwin-2level
  /usr/local/lib/perl5/5.25.1
  .


Environment for perl 5.25.1​:
  DYLD_LIBRARY_PATH (unset)
  HOME=/Users/cwhitener
  LANG=en_US.UTF-8
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/Users/cwhitener/perl5/perlbrew/bin​:/Users/cwhitener/perl5/perlbrew/perls/perl-5.24.0/bin​:/usr/local/opt/gnu-tar/libexec/gnubin​:/usr/local/bin​:/usr/bin​:/bin​:/usr/sbin​:/sbin​:/opt/X11/bin​:/Users/cwhitener/bin
  PERLBREW_BASHRC_VERSION=0.73
  PERLBREW_HOME=/Users/cwhitener/.perlbrew
  PERLBREW_MANPATH=/Users/cwhitener/perl5/perlbrew/perls/perl-5.24.0/man
  PERLBREW_PATH=/Users/cwhitener/perl5/perlbrew/bin​:/Users/cwhitener/perl5/perlbrew/perls/perl-5.24.0/bin
  PERLBREW_PERL=perl-5.24.0
  PERLBREW_ROOT=/Users/cwhitener/perl5/perlbrew
  PERLBREW_VERSION=0.73
  PERL_BADLANG (unset)
  SHELL=/bin/bash

@p5pRT
Copy link
Author

p5pRT commented May 18, 2016

From cwhitener@gmail.com

0001-Indirect-object-syntax-fixed-in-FileHandle.pm.patch
From 98c652381c3f7d3e99f896a07b5d9194cdcb4e93 Mon Sep 17 00:00:00 2001
From: Chase Whitener <cwhitener@gmail.com>
Date: Wed, 18 May 2016 12:20:28 -0400
Subject: [PATCH] Indirect object syntax fixed in FileHandle.pm

---
 lib/FileHandle.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/FileHandle.pm b/lib/FileHandle.pm
index 6b3636a..85bb09d 100644
--- a/lib/FileHandle.pm
+++ b/lib/FileHandle.pm
@@ -36,7 +36,7 @@ require IO::File;
 #
 # Everything we're willing to export, we must first import.
 #
-import IO::Handle grep { !defined(&$_) } @EXPORT, @EXPORT_OK;
+IO::Handle->import( grep { !defined(&$_) } @EXPORT, @EXPORT_OK );
 
 #
 # Some people call "FileHandle::function", so all the functions
@@ -88,8 +88,8 @@ sub import {
 #
 
 sub pipe {
-    my $r = new IO::Handle;
-    my $w = new IO::Handle;
+    my $r = IO::Handle->new;
+    my $w = IO::Handle->new;
     CORE::pipe($r, $w) or return undef;
     ($r, $w);
 }
-- 
2.7.4 (Apple Git-66)

@p5pRT
Copy link
Author

p5pRT commented May 20, 2016

From @jkeenan

On Wed May 18 09​:33​:39 2016, cwhitener@​gmail.com wrote​:

This is a bug report for perl from cwhitener@​gmail.com,
generated with the help of perlbug 1.40 running under perl 5.25.1.

-----------------------------------------------------------------
Simple update of FileHandle to no longer use indirect object syntax.

= new IO​::Handle; to = IO​::Handle->new;

Patch seems reasonable. p5p​: Shall I apply?

Thank you very much.
Jim Keenan

-----------------------------------------------------------------
---
Flags​:
category=library
severity=low
Type=Patch
PatchStatus=HasPatch
module=FileHandle
---
Site configuration information for perl 5.25.1​:

Configured by cwhitener at Wed May 18 11​:58​:31 EDT 2016.

Summary of my perl5 (revision 5 version 25 subversion 1)
configuration​:
Derived from​: 9cd3bbf
Platform​:
osname=darwin, osvers=15.4.0, archname=darwin-2level
uname='darwin macmini-4312.ad.infotechfl.com 15.4.0 darwin kernel
version 15.4.0​: fri feb 26 22​:08​:05 pst 2016; root​:xnu-
3248.40.184~3release_x86_64 x86_64 '
config_args='-des -Dusedevel'
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 -mmacosx-version-
min=10.11 -fno-strict-aliasing -pipe -fstack-protector-strong
-I/usr/local/include -DPERL_USE_SAFE_PUTENV',
optimize='-O3',
cppflags='-fno-common -DPERL_DARWIN -mmacosx-version-min=10.11
-fno-strict-aliasing -pipe -fstack-protector-strong
-I/usr/local/include'
ccversion='', gccversion='4.2.1 Compatible Apple LLVM 7.3.0
(clang-703.0.31)', 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='cc', ldflags =' -mmacosx-version-min=10.11 -fstack-protector-
strong -L/usr/local/lib'
libpth=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/lib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib
/usr/local/lib /usr/lib
libs=-lpthread -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=' -mmacosx-version-min=10.11 -bundle
-undefined dynamic_lookup -L/usr/local/lib -fstack-protector-strong'

Locally applied patches​:
uncommitted-changes

---
@​INC for perl 5.25.1​:
lib
/usr/local/lib/perl5/site_perl/5.25.1/darwin-2level
/usr/local/lib/perl5/site_perl/5.25.1
/usr/local/lib/perl5/5.25.1/darwin-2level
/usr/local/lib/perl5/5.25.1
.

---
Environment for perl 5.25.1​:
DYLD_LIBRARY_PATH (unset)
HOME=/Users/cwhitener
LANG=en_US.UTF-8
LANGUAGE (unset)
LD_LIBRARY_PATH (unset)
LOGDIR (unset)
PATH=/Users/cwhitener/perl5/perlbrew/bin​:/Users/cwhitener/perl5/perlbrew/perls/perl-
5.24.0/bin​:/usr/local/opt/gnu-
tar/libexec/gnubin​:/usr/local/bin​:/usr/bin​:/bin​:/usr/sbin​:/sbin​:/opt/X11/bin​:/Users/cwhitener/bin
PERLBREW_BASHRC_VERSION=0.73
PERLBREW_HOME=/Users/cwhitener/.perlbrew
PERLBREW_MANPATH=/Users/cwhitener/perl5/perlbrew/perls/perl-
5.24.0/man
PERLBREW_PATH=/Users/cwhitener/perl5/perlbrew/bin​:/Users/cwhitener/perl5/perlbrew/perls/perl-
5.24.0/bin
PERLBREW_PERL=perl-5.24.0
PERLBREW_ROOT=/Users/cwhitener/perl5/perlbrew
PERLBREW_VERSION=0.73
PERL_BADLANG (unset)
SHELL=/bin/bash

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented May 20, 2016

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented May 20, 2016

From @ap

* James E Keenan via RT <perlbug-followup@​perl.org> [2016-05-20 04​:23]​:

Shall I apply?

Aye, IMO.

@p5pRT
Copy link
Author

p5pRT commented May 20, 2016

From @jkeenan

On Thu May 19 23​:30​:31 2016, aristotle wrote​:

* James E Keenan via RT <perlbug-followup@​perl.org> [2016-05-20 04​:23]​:

Shall I apply?

Aye, IMO.

Thanks for the patch.

Applied to blead in commit 001761d.
--
James E Keenan (jkeenan@​cpan.org)

@p5pRT p5pRT closed this as completed May 20, 2016
@p5pRT
Copy link
Author

p5pRT commented May 20, 2016

@jkeenan - Status changed from 'open' to 'resolved'

@p5pRT
Copy link
Author

p5pRT commented May 24, 2016

From @xsawyerx

On 05/20/2016 12​:57 PM, James E Keenan via RT wrote​:

On Thu May 19 23​:30​:31 2016, aristotle wrote​:

* James E Keenan via RT <perlbug-followup@​perl.org> [2016-05-20 04​:23]​:

Shall I apply?
Aye, IMO.

Thanks for the patch.

Applied to blead in commit 001761d.

Thanks, James!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant