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

\@ prototypes and anonymous scalar refs #9111

Closed
p5pRT opened this issue Nov 12, 2007 · 4 comments

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Nov 12, 2007

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

Searchable as RT47363$

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Nov 12, 2007

From webmasters@ctosonline.org

(Assume these examples all begin with 'use Data​::Dumper'.)

This doesn't cause a parse error. Instead, it passes a reference to an
anon scalar to &foo​:
  sub foo(\@​) { print Dumper @​_ }; foo((@​foo))
as does this​:
  sub foo(\@​) { print Dumper @​_ }; foo+(@​foo)
But these three work fine​:
  sub foo(\@​) { print Dumper @​_ }; foo+@​foo
  sub foo(\@​) { print Dumper @​_ }; foo(+@​foo)
  sub foo(\@​) { print Dumper @​_ }; foo(+ +@​foo)


Flags​:
  category=core
  severity=low


Site configuration information for perl v5.8.8​:

Configured by root at Sun Sep 23 19​:05​:56 PDT 2007.

Summary of my perl5 (revision 5 version 8 subversion 8) configuration​:
  Platform​:
  osname=darwin, osvers=9.0, archname=darwin-thread-multi-2level
  uname='darwin omen.apple.com 9.0 darwin kernel version 9.0.0b5​:
mon sep 10 17​:17​:11 pdt 2007; root​:xnu-1166.6~1release_ppc power
macintosh '
  config_args='-ds -e -Dprefix=/usr -Dccflags=-g -pipe -Dldflags=-
Dman3ext=3pm -Duseithreads -Duseshrplib'
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
  useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
  use64bitint=define use64bitall=define uselongdouble=undef
  usemymalloc=n, bincompat5005=undef
  Compiler​:
  cc='cc', ccflags ='-arch i386 -arch ppc -g -pipe -fno-common -
DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -Wdeclaration-after-
statement -I/usr/local/include',
  optimize='-O3',
  cppflags='-no-cpp-precomp -g -pipe -fno-common -DPERL_DARWIN -no-
cpp-precomp -fno-strict-aliasing -Wdeclaration-after-statement -I/usr/
local/include'
  ccversion='', gccversion='4.0.1 (Apple Inc. build 5465)',
gccosandvers=''
  intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
  ivtype='long', ivsize=4, nvtype='double', nvsize=8,
Off_t='off_t', lseeksize=8
  alignbytes=8, prototype=define
  Linker and Libraries​:
  ld='cc -mmacosx-version-min=10.5', ldflags ='-arch i386 -arch ppc
-L/usr/local/lib'
  libpth=/usr/local/lib /usr/lib
  libs=-ldbm -ldl -lm -lutil -lc
  perllibs=-ldl -lm -lutil -lc
  libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true,
libperl=libperl.dylib
  gnulibc_version=''
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
  cccdlflags=' ', lddlflags='-arch i386 -arch ppc -bundle -
undefined dynamic_lookup -L/usr/local/lib'

Locally applied patches​:


@​INC for perl v5.8.8​:
  /System/Library/Perl/5.8.8/darwin-thread-multi-2level
  /System/Library/Perl/5.8.8
  /Library/Perl/5.8.8/darwin-thread-multi-2level
  /Library/Perl/5.8.8
  /Library/Perl
  /Network/Library/Perl/5.8.8/darwin-thread-multi-2level
  /Network/Library/Perl/5.8.8
  /Network/Library/Perl
  /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level
  /System/Library/Perl/Extras/5.8.8
  /Library/Perl/5.8.6/darwin-thread-multi-2level
  /Library/Perl/5.8.6
  /Library/Perl/5.8.1
  .


Environment for perl v5.8.8​:
  DYLD_LIBRARY_PATH (unset)
  HOME=/Users/sprout
  LANG=en_US.UTF-8
  LANGUAGE (unset)
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/bin​:/sbin​:/usr/bin​:/usr/sbin​:/usr/local/pgsql/bin​:/usr/TeX/
bin/powerpc-darwin6.8/​:/usr/local/bin
  PERL_BADLANG (unset)
  SHELL=/bin/bash

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Nov 25, 2014

From @cpansprout

On Sun Nov 11 17​:45​:29 2007, webmasters ctosonline.org wrote​:

(Assume these examples all begin with 'use Data​::Dumper'.)

This doesn't cause a parse error. Instead, it passes a reference to an
anon scalar to &foo​:
sub foo(\@​) { print Dumper @​_ }; foo((@​foo))
as does this​:
sub foo(\@​) { print Dumper @​_ }; foo+(@​foo)
But these three work fine​:
sub foo(\@​) { print Dumper @​_ }; foo+@​foo
sub foo(\@​) { print Dumper @​_ }; foo(+@​foo)
sub foo(\@​) { print Dumper @​_ }; foo(+ +@​foo)

Fixed in 0c46edc.

--

Father Chrysostomos

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Nov 25, 2014

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

@p5pRT p5pRT closed this Nov 25, 2014
@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Nov 25, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.