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

"Name "%s::%s" used only once" warnings are not fatalized #13814

Closed
p5pRT opened this issue May 9, 2014 · 5 comments · Fixed by #21693
Closed

"Name "%s::%s" used only once" warnings are not fatalized #13814

p5pRT opened this issue May 9, 2014 · 5 comments · Fixed by #21693
Assignees

Comments

@p5pRT
Copy link

p5pRT commented May 9, 2014

Migrated from rt.perl.org#121834 (status was 'open')

Searchable as RT121834$

@p5pRT
Copy link
Author

p5pRT commented May 9, 2014

From @karenetheridge

Created by @karenetheridge

This code​:

  use strict;
  use warnings FATAL => qw(once);
  print @​Foo​::bar, "\n";
  print "still alive\n";

Should be fatal. Instead, it prints​:

  Name "Foo​::bar" used only once​: possible typo at foo.pl line 3.

  still alive

(Behaviour is the same with "use warnings FATAL => 'all'".)

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl 5.19.11:

Configured by ether at Sun Apr 20 19:21:41 PDT 2014.

Summary of my perl5 (revision 5 version 19 subversion 11) configuration:
   
  Platform:
    osname=darwin, osvers=10.8.0, archname=darwin-2level
    uname='darwin tequila 10.8.0 darwin kernel version 10.8.0: tue jun 7 16:33:36 pdt 2011; root:xnu-1504.15.3~1release_i386 i386 '
    config_args='-de -Dprefix=/Users/ether/perl5/perlbrew/perls/19.11 -Dman1dir=none -Dman3dir=none -Dusedevel -Aeval:scriptdir=/Users/ether/perl5/perlbrew/perls/19.11/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 -I/usr/local/include -I/opt/local/include',
    optimize='-O3',
    cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include'
    ccversion='', gccversion='4.2.1 (Apple Inc. build 5666) (dot 3)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    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 -L/usr/local/lib -L/opt/local/lib'
    libpth=/usr/local/lib /usr/lib /opt/local/lib
    libs=-lgdbm -ldbm -ldl -lm -lutil -lc
    perllibs=-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'



@INC for perl 5.19.11:
    /Users/ether/.perlbrew/libs/19.11@std/lib/perl5/darwin-2level
    /Users/ether/.perlbrew/libs/19.11@std/lib/perl5
    /Users/ether/perl5/perlbrew/perls/19.11/lib/site_perl/5.19.11/darwin-2level
    /Users/ether/perl5/perlbrew/perls/19.11/lib/site_perl/5.19.11
    /Users/ether/perl5/perlbrew/perls/19.11/lib/5.19.11/darwin-2level
    /Users/ether/perl5/perlbrew/perls/19.11/lib/5.19.11
    .


Environment for perl 5.19.11:
    DYLD_LIBRARY_PATH (unset)
    HOME=/Users/ether
    LANG=en_CA.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/Users/ether/.perlbrew/libs/19.11@std/bin:/Users/ether/perl5/perlbrew/bin:/Users/ether/perl5/perlbrew/perls/19.11/bin:/Users/ether/bin:/Users/ether/git/misc/install/tequila/bin:/Users/ether/git/misc/install/generic/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/share/git-core/contrib/workdir
    PERL5LIB=/Users/ether/.perlbrew/libs/19.11@std/lib/perl5
    PERLBREW_BASHRC_VERSION=0.67
    PERLBREW_HOME=/Users/ether/.perlbrew
    PERLBREW_LIB=std
    PERLBREW_MANPATH=/Users/ether/.perlbrew/libs/19.11@std/man:/Users/ether/perl5/perlbrew/perls/19.11/man
    PERLBREW_PATH=/Users/ether/.perlbrew/libs/19.11@std/bin:/Users/ether/perl5/perlbrew/bin:/Users/ether/perl5/perlbrew/perls/19.11/bin
    PERLBREW_PERL=19.11
    PERLBREW_ROOT=/Users/ether/perl5/perlbrew
    PERLBREW_VERSION=0.67
    PERLDOC_PAGER=less -sicMr
    PERL_AUTOINSTALL_PREFER_CPAN=1
    PERL_BADLANG (unset)
    PERL_LOCAL_LIB_ROOT=/Users/ether/.perlbrew/libs/19.11@std
    PERL_MB_OPT=--install_base /Users/ether/.perlbrew/libs/19.11@std
    PERL_MM_OPT=INSTALL_BASE=/Users/ether/.perlbrew/libs/19.11@std
    SHELL=/bin/bash

Complete configuration data for perl 5.19.11:

Author=''
CONFIG='true'
Date='$Date'
Header=''
Id='$Id'
LANG='C'
LC_ALL='C'
Locker=''
Log='$Log'
PATCHLEVEL='19'
PERL_API_REVISION='5'
PERL_API_SUBVERSION='11'
PERL_API_VERSION='19'
PERL_CONFIG_SH='true'
PERL_PATCHLEVEL=''
PERL_REVISION='5'
PERL_SUBVERSION='11'
PERL_VERSION='19'
RCSfile='$RCSfile'
Revision='$Revision'
SUBVERSION='11'
Source=''
State=''
_a='.a'
_exe=''
_o='.o'
afs='false'
afsroot='/afs'
alignbytes='8'
ansi2knr=''
aphostname='/bin/hostname'
api_revision='5'
api_subversion='11'
api_version='19'
api_versionstring='5.19.11'
ar='ar'
archlib='/Users/ether/perl5/perlbrew/perls/19.11/lib/5.19.11/darwin-2level'
archlibexp='/Users/ether/perl5/perlbrew/perls/19.11/lib/5.19.11/darwin-2level'
archname='darwin-2level'
archname64=''
archobjs=''
asctime_r_proto='0'
awk='awk'
baserev='5.0'
bash=''
bin='/Users/ether/perl5/perlbrew/perls/19.11/bin'
bin_ELF=''
binexp='/Users/ether/perl5/perlbrew/perls/19.11/bin'
bison='bison'
bootstrap_charset=''
byacc='byacc'
byteorder='12345678'
c='\c'
castflags='0'
cat='cat'
cc='cc'
cccdlflags=' '
ccdlflags=' '
ccflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include'
ccflags_nolargefiles='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include'
ccflags_uselargefiles=''
ccname='gcc'
ccsymbols='__DYNAMIC__=1'
ccversion=''
cf_by='ether'
cf_email='ether@tequila.nonet'
cf_time='Sun Apr 20 19:21:41 PDT 2014'
charbits='8'
charsize='1'
chgrp=''
chmod='chmod'
chown=''
clocktype='clock_t'
comm='comm'
compress=''
config_arg0='Configure'
config_arg1='-de'
config_arg2='-Dprefix=/Users/ether/perl5/perlbrew/perls/19.11'
config_arg3='-Dman1dir=none'
config_arg4='-Dman3dir=none'
config_arg5='-Dusedevel'
config_arg6='-Aeval:scriptdir=/Users/ether/perl5/perlbrew/perls/19.11/bin'
config_argc='6'
config_args='-de -Dprefix=/Users/ether/perl5/perlbrew/perls/19.11 -Dman1dir=none -Dman3dir=none -Dusedevel -Aeval:scriptdir=/Users/ether/perl5/perlbrew/perls/19.11/bin'
contains='grep'
cp='cp'
cpio=''
cpp='cpp'
cpp_stuff='42'
cppccsymbols=''
cppflags='-fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include'
cpplast='-'
cppminus='-'
cpprun='cc  -E'
cppstdin='cc  -E'
cppsymbols='_LP64=1 __GNUC_MINOR__=2 __GNUC__=4 __LITTLE_ENDIAN__=1 __LP64__=1 __MACH__=1 __PIC__=2 __STDC__=1 __amd64=1 __amd64__=1 __pic__=2 __x86_64=1 __x86_64__=1'
crypt_r_proto='0'
cryptlib=''
csh='csh'
ctermid_r_proto='0'
ctime_r_proto='0'
d_Gconvert='sprintf((b),"%.*g",(n),(x))'
d_PRIEUldbl='define'
d_PRIFUldbl='define'
d_PRIGUldbl='define'
d_PRIXU64='define'
d_PRId64='define'
d_PRIeldbl='define'
d_PRIfldbl='define'
d_PRIgldbl='define'
d_PRIi64='define'
d_PRIo64='define'
d_PRIu64='define'
d_PRIx64='define'
d_SCNfldbl='define'
d__fwalk=''
d_access='define'
d_accessx=''
d_aintl=''
d_alarm='define'
d_archlib='define'
d_asctime64=''
d_asctime_r=''
d_atolf=''
d_atoll='define'
d_attribute_deprecated='define'
d_attribute_format='define'
d_attribute_malloc='define'
d_attribute_nonnull='define'
d_attribute_noreturn='define'
d_attribute_pure='define'
d_attribute_unused='define'
d_attribute_warn_unused_result='define'
d_bcmp='define'
d_bcopy='define'
d_bsd='define'
d_bsdgetpgrp=''
d_bsdsetpgrp=''
d_builtin_choose_expr='define'
d_builtin_expect='define'
d_bzero='define'
d_c99_variadic_macros='define'
d_casti32=''
d_castneg='define'
d_charvspr=''
d_chown='define'
d_chroot='define'
d_chsize=''
d_class=''
d_clearenv=''
d_closedir='define'
d_cmsghdr_s='define'
d_const='define'
d_copysignl='define'
d_cplusplus=''
d_crypt='define'
d_crypt_r=''
d_csh='define'
d_ctermid='define'
d_ctermid_r=''
d_ctime64=''
d_ctime_r=''
d_cuserid=''
d_dbl_dig='define'
d_dbminitproto=''
d_difftime='define'
d_difftime64=''
d_dir_dd_fd=''
d_dirfd='define'
d_dirnamlen='define'
d_dlerror='define'
d_dlopen='define'
d_dlsymun=''
d_dosuid=''
d_drand48_r=''
d_drand48proto='define'
d_dup2='define'
d_eaccess=''
d_endgrent='define'
d_endgrent_r=''
d_endhent='define'
d_endhostent_r=''
d_endnent='define'
d_endnetent_r=''
d_endpent='define'
d_endprotoent_r=''
d_endpwent='define'
d_endpwent_r=''
d_endsent='define'
d_endservent_r=''
d_eofnblk='define'
d_eunice=''
d_faststdio='define'
d_fchdir='define'
d_fchmod='define'
d_fchown='define'
d_fcntl='define'
d_fcntl_can_lock='define'
d_fd_macros='define'
d_fd_set='define'
d_fds_bits='define'
d_fgetpos='define'
d_finite='define'
d_finitel=''
d_flexfnam='define'
d_flock='define'
d_flockproto='define'
d_fork='define'
d_fp_class=''
d_fpathconf='define'
d_fpclass=''
d_fpclassify=''
d_fpclassl=''
d_fpos64_t=''
d_frexpl='define'
d_fs_data_s=''
d_fseeko='define'
d_fsetpos='define'
d_fstatfs='define'
d_fstatvfs='define'
d_fsync='define'
d_ftello='define'
d_ftime=''
d_futimes='define'
d_gdbm_ndbm_h_uses_prototypes=''
d_gdbmndbm_h_uses_prototypes=''
d_getaddrinfo='define'
d_getcwd='define'
d_getespwnam=''
d_getfsstat='define'
d_getgrent='define'
d_getgrent_r=''
d_getgrgid_r=''
d_getgrnam_r=''
d_getgrps='define'
d_gethbyaddr='define'
d_gethbyname='define'
d_gethent='define'
d_gethname='define'
d_gethostbyaddr_r=''
d_gethostbyname_r=''
d_gethostent_r=''
d_gethostprotos='define'
d_getitimer='define'
d_getlogin='define'
d_getlogin_r=''
d_getmnt=''
d_getmntent=''
d_getnameinfo='define'
d_getnbyaddr='define'
d_getnbyname='define'
d_getnent='define'
d_getnetbyaddr_r=''
d_getnetbyname_r=''
d_getnetent_r=''
d_getnetprotos='define'
d_getpagsz='define'
d_getpbyname='define'
d_getpbynumber='define'
d_getpent='define'
d_getpgid='define'
d_getpgrp='define'
d_getpgrp2=''
d_getppid='define'
d_getprior='define'
d_getprotobyname_r=''
d_getprotobynumber_r=''
d_getprotoent_r=''
d_getprotoprotos='define'
d_getprpwnam=''
d_getpwent='define'
d_getpwent_r=''
d_getpwnam_r=''
d_getpwuid_r=''
d_getsbyname='define'
d_getsbyport='define'
d_getsent='define'
d_getservbyname_r=''
d_getservbyport_r=''
d_getservent_r=''
d_getservprotos='define'
d_getspnam=''
d_getspnam_r=''
d_gettimeod='define'
d_gmtime64=''
d_gmtime_r=''
d_gnulibc=''
d_grpasswd='define'
d_hasmntopt=''
d_htonl='define'
d_ilogbl='define'
d_inc_version_list=''
d_index=''
d_inetaton='define'
d_inetntop='define'
d_inetpton='define'
d_int64_t='define'
d_ip_mreq='define'
d_ip_mreq_source=''
d_ipv6_mreq='define'
d_ipv6_mreq_source=''
d_isascii='define'
d_isblank='define'
d_isfinite=''
d_isinf='define'
d_isnan='define'
d_isnanl=''
d_killpg='define'
d_lchown='define'
d_ldbl_dig='define'
d_libm_lib_version=''
d_libname_unique=''
d_link='define'
d_localtime64=''
d_localtime_r=''
d_localtime_r_needs_tzset=''
d_locconv='define'
d_lockf='define'
d_longdbl='define'
d_longlong='define'
d_lseekproto='define'
d_lstat='define'
d_madvise='define'
d_malloc_good_size='define'
d_malloc_size='define'
d_mblen='define'
d_mbstowcs='define'
d_mbtowc='define'
d_memchr='define'
d_memcmp='define'
d_memcpy='define'
d_memmove='define'
d_memset='define'
d_mkdir='define'
d_mkdtemp='define'
d_mkfifo='define'
d_mkstemp='define'
d_mkstemps='define'
d_mktime='define'
d_mktime64=''
d_mmap='define'
d_modfl='define'
d_modfl_pow32_bug=''
d_modflproto='define'
d_mprotect='define'
d_msg='define'
d_msg_ctrunc='define'
d_msg_dontroute='define'
d_msg_oob='define'
d_msg_peek='define'
d_msg_proxy=''
d_msgctl='define'
d_msgget='define'
d_msghdr_s='define'
d_msgrcv='define'
d_msgsnd='define'
d_msync='define'
d_munmap='define'
d_mymalloc=''
d_ndbm='define'
d_ndbm_h_uses_prototypes='define'
d_nice='define'
d_nl_langinfo='define'
d_nv_preserves_uv=''
d_nv_zero_is_allbits_zero='define'
d_off64_t=''
d_old_pthread_create_joinable=''
d_oldpthreads=''
d_oldsock=''
d_open3='define'
d_pathconf='define'
d_pause='define'
d_perl_otherlibdirs=''
d_phostname=''
d_pipe='define'
d_poll=''
d_portable='define'
d_prctl=''
d_prctl_set_name=''
d_printf_format_null=''
d_procselfexe=''
d_pseudofork=''
d_pthread_atfork='define'
d_pthread_attr_setscope='define'
d_pthread_yield=''
d_pwage=''
d_pwchange='define'
d_pwclass='define'
d_pwcomment=''
d_pwexpire='define'
d_pwgecos='define'
d_pwpasswd='define'
d_pwquota=''
d_qgcvt=''
d_quad='define'
d_random_r=''
d_readdir='define'
d_readdir64_r=''
d_readdir_r=''
d_readlink='define'
d_readv='define'
d_recvmsg='define'
d_rename='define'
d_rewinddir='define'
d_rmdir='define'
d_safebcpy=''
d_safemcpy=''
d_sanemcmp='define'
d_sbrkproto='define'
d_scalbnl='define'
d_sched_yield='define'
d_scm_rights='define'
d_seekdir='define'
d_select='define'
d_sem='define'
d_semctl='define'
d_semctl_semid_ds='define'
d_semctl_semun='define'
d_semget='define'
d_semop='define'
d_sendmsg='define'
d_setegid='define'
d_seteuid='define'
d_setgrent='define'
d_setgrent_r=''
d_setgrps='define'
d_sethent='define'
d_sethostent_r=''
d_setitimer='define'
d_setlinebuf='define'
d_setlocale='define'
d_setlocale_r=''
d_setnent='define'
d_setnetent_r=''
d_setpent='define'
d_setpgid='define'
d_setpgrp='define'
d_setpgrp2=''
d_setprior='define'
d_setproctitle=''
d_setprotoent_r=''
d_setpwent='define'
d_setpwent_r=''
d_setregid='define'
d_setresgid=''
d_setresuid=''
d_setreuid='define'
d_setrgid='define'
d_setruid='define'
d_setsent='define'
d_setservent_r=''
d_setsid='define'
d_setvbuf='define'
d_shm='define'
d_shmat='define'
d_shmatprototype='define'
d_shmctl='define'
d_shmdt='define'
d_shmget='define'
d_sigaction='define'
d_signbit='define'
d_sigprocmask='define'
d_sigsetjmp='define'
d_sin6_scope_id='define'
d_sitearch='define'
d_snprintf='define'
d_sockaddr_in6='define'
d_sockaddr_sa_len='define'
d_sockatmark='define'
d_sockatmarkproto='define'
d_socket='define'
d_socklen_t='define'
d_sockpair='define'
d_socks5_init=''
d_sprintf_returns_strlen='define'
d_sqrtl='define'
d_srand48_r=''
d_srandom_r=''
d_sresgproto=''
d_sresuproto=''
d_statblks='define'
d_statfs_f_flags='define'
d_statfs_s='define'
d_static_inline='define'
d_statvfs='define'
d_stdio_cnt_lval='define'
d_stdio_ptr_lval='define'
d_stdio_ptr_lval_nochange_cnt='define'
d_stdio_ptr_lval_sets_cnt=''
d_stdio_stream_array=''
d_stdiobase='define'
d_stdstdio='define'
d_strchr='define'
d_strcoll='define'
d_strctcpy='define'
d_strerrm='strerror(e)'
d_strerror='define'
d_strerror_r=''
d_strftime='define'
d_strlcat='define'
d_strlcpy='define'
d_strtod='define'
d_strtol='define'
d_strtold='define'
d_strtoll='define'
d_strtoq='define'
d_strtoul='define'
d_strtoull='define'
d_strtouq='define'
d_strxfrm='define'
d_suidsafe=''
d_symlink='define'
d_syscall='define'
d_syscallproto='define'
d_sysconf='define'
d_sysernlst=''
d_syserrlst='define'
d_system='define'
d_tcgetpgrp='define'
d_tcsetpgrp='define'
d_telldir='define'
d_telldirproto='define'
d_time='define'
d_timegm='define'
d_times='define'
d_tm_tm_gmtoff='define'
d_tm_tm_zone='define'
d_tmpnam_r=''
d_truncate='define'
d_ttyname_r=''
d_tzname='define'
d_u32align='define'
d_ualarm='define'
d_umask='define'
d_uname='define'
d_union_semun='define'
d_unordered=''
d_unsetenv='define'
d_usleep='define'
d_usleepproto='define'
d_ustat=''
d_vendorarch=''
d_vendorbin=''
d_vendorlib=''
d_vendorscript=''
d_vfork='define'
d_void_closedir=''
d_voidsig='define'
d_voidtty=''
d_volatile='define'
d_vprintf='define'
d_vsnprintf='define'
d_wait4='define'
d_waitpid='define'
d_wcstombs='define'
d_wctomb='define'
d_writev='define'
d_xenix=''
date='date'
db_hashtype='u_int32_t'
db_prefixtype='size_t'
db_version_major='1'
db_version_minor='0'
db_version_patch='0'
direntrytype='struct dirent'
dlext='bundle'
dlsrc='dl_dlopen.xs'
doublesize='8'
drand01='Perl_drand48()'
drand48_r_proto='0'
dtrace=''
dynamic_ext='B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call GDBM_File Hash/Util Hash/Util/FieldHash I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File Opcode POSIX PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Tie/Hash/NamedCapture Time/HiRes Time/Piece Unicode/Collate Unicode/Normalize XS/APItest XS/Typemap arybase attributes mro re threads threads/shared'
eagain='EAGAIN'
ebcdic=''
echo='echo'
egrep='egrep'
emacs=''
endgrent_r_proto='0'
endhostent_r_proto='0'
endnetent_r_proto='0'
endprotoent_r_proto='0'
endpwent_r_proto='0'
endservent_r_proto='0'
eunicefix=':'
exe_ext=''
expr='expr'
extensions='B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd DB_File Data/Dumper Devel/PPPort Devel/Peek Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call GDBM_File Hash/Util Hash/Util/FieldHash I18N/Langinfo IO IPC/SysV List/Util MIME/Base64 Math/BigInt/FastCalc NDBM_File Opcode POSIX PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via SDBM_File Socket Storable Sys/Hostname Sys/Syslog Tie/Hash/NamedCapture Time/HiRes Time/Piece Unicode/Collate Unicode/Normalize XS/APItest XS/Typemap arybase attributes mro re threads threads/shared Archive/Tar Attribute/Handlers AutoLoader B/Debug CGI CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Carp Config/Perl/V Devel/SelfStubber Digest Dumpvalue Env Errno Exporter ExtUtils/CBuilder ExtUtils/Command ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS File/Fetch File/Find File/Path File/Temp FileCache Filter/Simple Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 JSON/PP Locale/Codes Locale/Maketext Locale/Maketext/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/Build Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata NEXT Net/Ping Package/Constants Params/Check Parse/CPAN/Meta Perl/OSType PerlIO/via/QuotedPrint Pod/Checker Pod/Escapes Pod/Functions Pod/Html Pod/Parser Pod/Perldoc Pod/Simple Pod/Usage Safe Search/Dict SelfLoader Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Memoize Tie/RefHash Time/Local XSLoader autodie autouse base bignum constant encoding/warnings experimental if lib libnet parent perlfaq podlators version'
extern_C='extern'
extras=''
fflushNULL='define'
fflushall=''
find=''
firstmakefile='GNUmakefile'
flex=''
fpossize='8'
fpostype='fpos_t'
freetype='void'
from=':'
full_ar='/usr/bin/ar'
full_csh='/bin/csh'
full_sed='/usr/bin/sed'
gccansipedantic=''
gccosandvers=''
gccversion='4.2.1 (Apple Inc. build 5666) (dot 3)'
getgrent_r_proto='0'
getgrgid_r_proto='0'
getgrnam_r_proto='0'
gethostbyaddr_r_proto='0'
gethostbyname_r_proto='0'
gethostent_r_proto='0'
getlogin_r_proto='0'
getnetbyaddr_r_proto='0'
getnetbyname_r_proto='0'
getnetent_r_proto='0'
getprotobyname_r_proto='0'
getprotobynumber_r_proto='0'
getprotoent_r_proto='0'
getpwent_r_proto='0'
getpwnam_r_proto='0'
getpwuid_r_proto='0'
getservbyname_r_proto='0'
getservbyport_r_proto='0'
getservent_r_proto='0'
getspnam_r_proto='0'
gidformat='"u"'
gidsign='1'
gidsize='4'
gidtype='gid_t'
git_branch=''
git_commit_id=''
git_commit_id_title=''
git_describe=''
git_uncommitted_changes=''
glibpth='/usr/shlib  /lib /usr/lib /usr/lib/386 /lib/386 /usr/ccs/lib /usr/ucblib /usr/local/lib '
gmake='gmake'
gmtime_r_proto='0'
gnulibc_version=''
grep='grep'
groupcat='cat /etc/group'
groupstype='gid_t'
gzip='gzip'
h_fcntl='false'
h_sysfile='true'
hint='recommended'
hostcat='cat /etc/hosts'
hostgenerate=''
hostosname=''
hostperl=''
html1dir=' '
html1direxp=''
html3dir=' '
html3direxp=''
i16size='2'
i16type='short'
i32size='4'
i32type='int'
i64size='8'
i64type='long'
i8size='1'
i8type='signed char'
i_arpainet='define'
i_assert='define'
i_bsdioctl=''
i_crypt=''
i_db='define'
i_dbm=''
i_dirent='define'
i_dlfcn='define'
i_fcntl=''
i_float='define'
i_fp=''
i_fp_class=''
i_gdbm='define'
i_gdbm_ndbm=''
i_gdbmndbm=''
i_grp='define'
i_ieeefp=''
i_inttypes='define'
i_langinfo='define'
i_libutil=''
i_limits='define'
i_locale='define'
i_machcthr=''
i_malloc=''
i_mallocmalloc='define'
i_math='define'
i_memory=''
i_mntent=''
i_ndbm='define'
i_netdb='define'
i_neterrno=''
i_netinettcp='define'
i_niin='define'
i_poll=''
i_prot=''
i_pthread='define'
i_pwd='define'
i_rpcsvcdbm=''
i_sgtty=''
i_shadow=''
i_socks=''
i_stdarg='define'
i_stdbool='define'
i_stddef='define'
i_stdlib='define'
i_string='define'
i_sunmath=''
i_sysaccess=''
i_sysdir='define'
i_sysfile='define'
i_sysfilio='define'
i_sysin=''
i_sysioctl='define'
i_syslog='define'
i_sysmman='define'
i_sysmode=''
i_sysmount='define'
i_sysndir=''
i_sysparam='define'
i_syspoll='define'
i_sysresrc='define'
i_syssecrt=''
i_sysselct='define'
i_syssockio='define'
i_sysstat='define'
i_sysstatfs=''
i_sysstatvfs='define'
i_systime='define'
i_systimek=''
i_systimes='define'
i_systypes='define'
i_sysuio='define'
i_sysun='define'
i_sysutsname='define'
i_sysvfs=''
i_syswait='define'
i_termio=''
i_termios='define'
i_time=''
i_unistd='define'
i_ustat=''
i_utime='define'
i_values=''
i_varargs=''
i_varhdr='stdarg.h'
i_vfork=''
ignore_versioned_solibs=''
inc_version_list=''
inc_version_list_init='0'
incpath=''
incpth='/usr/local/include /usr/lib/gcc/i686-apple-darwin10/4.2.1/include /usr/include'
inews=''
initialinstalllocation='/Users/ether/perl5/perlbrew/perls/19.11/bin'
installarchlib='/Users/ether/perl5/perlbrew/perls/19.11/lib/5.19.11/darwin-2level'
installbin='/Users/ether/perl5/perlbrew/perls/19.11/bin'
installhtml1dir=''
installhtml3dir=''
installman1dir=''
installman3dir=''
installprefix='/Users/ether/perl5/perlbrew/perls/19.11'
installprefixexp='/Users/ether/perl5/perlbrew/perls/19.11'
installprivlib='/Users/ether/perl5/perlbrew/perls/19.11/lib/5.19.11'
installscript='/Users/ether/perl5/perlbrew/perls/19.11/bin'
installsitearch='/Users/ether/perl5/perlbrew/perls/19.11/lib/site_perl/5.19.11/darwin-2level'
installsitebin='/Users/ether/perl5/perlbrew/perls/19.11/bin'
installsitehtml1dir=''
installsitehtml3dir=''
installsitelib='/Users/ether/perl5/perlbrew/perls/19.11/lib/site_perl/5.19.11'
installsiteman1dir=''
installsiteman3dir=''
installsitescript='/Users/ether/perl5/perlbrew/perls/19.11/bin'
installstyle='lib'
installusrbinperl=''
installvendorarch=''
installvendorbin=''
installvendorhtml1dir=''
installvendorhtml3dir=''
installvendorlib=''
installvendorman1dir=''
installvendorman3dir=''
installvendorscript=''
intsize='4'
issymlink='test -h'
ivdformat='"ld"'
ivsize='8'
ivtype='long'
known_extensions='Archive/Tar Attribute/Handlers AutoLoader B B/Debug CGI CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Carp Compress/Raw/Bzip2 Compress/Raw/Zlib Config/Perl/V Cwd DB_File Data/Dumper Devel/PPPort Devel/Peek Devel/SelfStubber Digest Digest/MD5 Digest/SHA Dumpvalue Encode Env Errno Exporter ExtUtils/CBuilder ExtUtils/Command ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS Fcntl File/DosGlob File/Fetch File/Find File/Glob File/Path File/Temp FileCache Filter/Simple Filter/Util/Call GDBM_File Getopt/Long HTTP/Tiny Hash/Util Hash/Util/FieldHash I18N/Collate I18N/LangTags I18N/Langinfo IO IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 IPC/SysV JSON/PP List/Util Locale/Codes Locale/Maketext Locale/Maketext/Simple MIME/Base64 Math/BigInt Math/BigInt/FastCalc Math/BigRat Math/Complex Memoize Module/Build Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata NDBM_File NEXT Net/Ping ODBM_File Opcode POSIX Package/Constants Params/Check Parse/CPAN/Meta Perl/OSType PerlIO/encoding PerlIO/mmap PerlIO/scalar PerlIO/via PerlIO/via/QuotedPrint Pod/Checker Pod/Escapes Pod/Functions Pod/Html Pod/Parser Pod/Perldoc Pod/Simple Pod/Usage SDBM_File Safe Search/Dict SelfLoader Socket Storable Sys/Hostname Sys/Syslog Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Hash/NamedCapture Tie/Memoize Tie/RefHash Time/HiRes Time/Local Time/Piece Unicode/Collate Unicode/Normalize VMS/DCLsym VMS/Filespec VMS/Stdio Win32 Win32API/File Win32CORE XS/APItest XS/Typemap XSLoader arybase attributes autodie autouse base bignum constant encoding/warnings experimental if lib libnet mro parent perlfaq podlators re threads threads/shared version '
ksh=''
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc'
ld_can_script=''
lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib -fstack-protector'
ldflags=' -fstack-protector -L/usr/local/lib -L/opt/local/lib'
ldflags_nolargefiles=' -fstack-protector -L/usr/local/lib -L/opt/local/lib'
ldflags_uselargefiles=''
ldlibpthname='DYLD_LIBRARY_PATH'
less='less'
lib_ext='.a'
libc=''
libperl='libperl.a'
libpth='/usr/local/lib /usr/lib /opt/local/lib'
libs='-lgdbm -ldbm -ldl -lm -lutil -lc'
libs_nolargefiles='-lgdbm -ldbm -ldl -lm -lutil -lc'
libsdirs=' /opt/local/lib /usr/lib'
libsfiles=' libgdbm.dylib libdbm.dylib libdl.dylib libm.dylib libutil.dylib libc.dylib'
libsfound=' /opt/local/lib/libgdbm.dylib /usr/lib/libdbm.dylib /usr/lib/libdl.dylib /usr/lib/libm.dylib /usr/lib/libutil.dylib /usr/lib/libc.dylib'
libspath=' /usr/local/lib /usr/lib /opt/local/lib'
libswanted='socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld sun m crypt sec util c cposix posix ucb bsd BSD'
libswanted_nolargefiles='socket bind inet nsl nm ndbm gdbm dbm db malloc dl ld sun m crypt sec util c cposix posix ucb bsd BSD'
libswanted_uselargefiles=''
line=''
lint=''
lkflags=''
ln='ln'
lns='/bin/ln -s'
localtime_r_proto='0'
locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
longdblsize='16'
longlongsize='8'
longsize='8'
lp=''
lpr=''
ls='ls'
lseeksize='8'
lseektype='off_t'
mad=''
madlyh=''
madlyobj=''
madlysrc=''
mail=''
mailx=''
make='make'
make_set_make='#'
malloc_cflags='ccflags="-DUSE_PERL_SBRK -DPERL_SBRK_VIA_MALLOC $ccflags"'
mallocobj=''
mallocsrc=''
malloctype='void *'
man1dir=' '
man1direxp=''
man1ext='0'
man3dir=' '
man3direxp=''
man3ext='0'
mips_type=''
mistrustnm=''
mkdir='mkdir'
mmaptype='void *'
modetype='mode_t'
more='more'
multiarch='define'
mv=''
myarchname='i386-darwin'
mydomain='.nonet'
myhostname='tequila'
myuname='darwin tequila 10.8.0 darwin kernel version 10.8.0: tue jun 7 16:33:36 pdt 2011; root:xnu-1504.15.3~1release_i386 i386 '
n=''
need_va_copy='define'
netdb_hlen_type='size_t'
netdb_host_type='char *'
netdb_name_type='const char *'
netdb_net_type='in_addr_t'
nm='nm'
nm_opt=''
nm_so_opt=''
nonxs_ext='Archive/Tar Attribute/Handlers AutoLoader B/Debug CGI CPAN CPAN/Meta CPAN/Meta/Requirements CPAN/Meta/YAML Carp Config/Perl/V Devel/SelfStubber Digest Dumpvalue Env Errno Exporter ExtUtils/CBuilder ExtUtils/Command ExtUtils/Constant ExtUtils/Install ExtUtils/MakeMaker ExtUtils/Manifest ExtUtils/Miniperl ExtUtils/ParseXS File/Fetch File/Find File/Path File/Temp FileCache Filter/Simple Getopt/Long HTTP/Tiny I18N/Collate I18N/LangTags IO/Compress IO/Socket/IP IO/Zlib IPC/Cmd IPC/Open3 JSON/PP Locale/Codes Locale/Maketext Locale/Maketext/Simple Math/BigInt Math/BigRat Math/Complex Memoize Module/Build Module/CoreList Module/Load Module/Load/Conditional Module/Loaded Module/Metadata NEXT Net/Ping Package/Constants Params/Check Parse/CPAN/Meta Perl/OSType PerlIO/via/QuotedPrint Pod/Checker Pod/Escapes Pod/Functions Pod/Html Pod/Parser Pod/Perldoc Pod/Simple Pod/Usage Safe Search/Dict SelfLoader Term/ANSIColor Term/Cap Term/Complete Term/ReadLine Test Test/Harness Test/Simple Text/Abbrev Text/Balanced Text/ParseWords Text/Tabs Thread/Queue Thread/Semaphore Tie/File Tie/Memoize Tie/RefHash Time/Local XSLoader autodie autouse base bignum constant encoding/warnings experimental if lib libnet parent perlfaq podlators version'
nroff='nroff'
nvEUformat='"E"'
nvFUformat='"F"'
nvGUformat='"G"'
nv_overflows_integers_at='256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0'
nv_preserves_uv_bits='53'
nveformat='"e"'
nvfformat='"f"'
nvgformat='"g"'
nvsize='8'
nvtype='double'
o_nonblock='O_NONBLOCK'
obj_ext='.o'
old_pthread_create_joinable=''
optimize='-O3'
orderlib='false'
osname='darwin'
osvers='10.8.0'
otherlibdirs=' '
package='perl5'
pager='/usr/bin/less -R'
passcat='cat /etc/passwd'
patchlevel='19'
path_sep=':'
perl='perl'
perl5='/Users/ether/perl5/perlbrew/perls/19.10/bin/perl'
perl_patchlevel=''
perl_revision='5'
perl_static_inline='static __inline__'
perl_subversion='11'
perl_version='19'
perladmin='ether@tequila.nonet'
perllibs='-ldl -lm -lutil -lc'
perlpath='/Users/ether/perl5/perlbrew/perls/19.11/bin/perl5.19.11'
pg='pg'
phostname='hostname'
pidtype='pid_t'
plibpth=''
pmake=''
pr=''
prefix='/Users/ether/perl5/perlbrew/perls/19.11'
prefixexp='/Users/ether/perl5/perlbrew/perls/19.11'
privlib='/Users/ether/perl5/perlbrew/perls/19.11/lib/5.19.11'
privlibexp='/Users/ether/perl5/perlbrew/perls/19.11/lib/5.19.11'
procselfexe=''
prototype='define'
ptrsize='8'
quadkind='2'
quadtype='long'
randbits='48'
randfunc='Perl_drand48'
random_r_proto='0'
randseedtype='U32'
ranlib='ranlib'
rd_nodata='-1'
readdir64_r_proto='0'
readdir_r_proto='0'
revision='5'
rm='rm'
rm_try='/bin/rm -f try try a.out .out try.[cho] try..o core core.try* try.core*'
rmail=''
run=''
runnm='false'
sGMTIME_max='67768036191676799'
sGMTIME_min='-62167132800'
sLOCALTIME_max='67768036191705599'
sLOCALTIME_min='-62167104000'
sPRIEUldbl='"LE"'
sPRIFUldbl='"LF"'
sPRIGUldbl='"LG"'
sPRIXU64='"lX"'
sPRId64='"ld"'
sPRIeldbl='"Le"'
sPRIfldbl='"Lf"'
sPRIgldbl='"Lg"'
sPRIi64='"li"'
sPRIo64='"lo"'
sPRIu64='"lu"'
sPRIx64='"lx"'
sSCNfldbl='"Lf"'
sched_yield='sched_yield()'
scriptdir='/Users/ether/perl5/perlbrew/perls/19.11/bin'
scriptdirexp='/Users/ether/perl5/perlbrew/perls/19.11/bin'
sed='sed'
seedfunc='Perl_drand48_init'
selectminbits='32'
selecttype='fd_set *'
sendmail=''
setgrent_r_proto='0'
sethostent_r_proto='0'
setlocale_r_proto='0'
setnetent_r_proto='0'
setprotoent_r_proto='0'
setpwent_r_proto='0'
setservent_r_proto='0'
sh='/bin/sh'
shar=''
sharpbang='#!'
shmattype='void *'
shortsize='2'
shrpenv=''
shsharp='true'
sig_count='32'
sig_name='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM URG STOP TSTP CONT CHLD TTIN TTOU IO XCPU XFSZ VTALRM PROF WINCH INFO USR1 USR2 IOT '
sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "EMT", "FPE", "KILL", "BUS", "SEGV", "SYS", "PIPE", "ALRM", "TERM", "URG", "STOP", "TSTP", "CONT", "CHLD", "TTIN", "TTOU", "IO", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "INFO", "USR1", "USR2", "IOT", 0'
sig_num='0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 6 '
sig_num_init='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 6, 0'
sig_size='33'
signal_t='void'
sitearch='/Users/ether/perl5/perlbrew/perls/19.11/lib/site_perl/5.19.11/darwin-2level'
sitearchexp='/Users/ether/perl5/perlbrew/perls/19.11/lib/site_perl/5.19.11/darwin-2level'
sitebin='/Users/ether/perl5/perlbrew/perls/19.11/bin'
sitebinexp='/Users/ether/perl5/perlbrew/perls/19.11/bin'
sitehtml1dir=''
sitehtml1direxp=''
sitehtml3dir=''
sitehtml3direxp=''
sitelib='/Users/ether/perl5/perlbrew/perls/19.11/lib/site_perl/5.19.11'
sitelib_stem='/Users/ether/perl5/perlbrew/perls/19.11/lib/site_perl'
sitelibexp='/Users/ether/perl5/perlbrew/perls/19.11/lib/site_perl/5.19.11'
siteman1dir=''
siteman1direxp=''
siteman3dir=''
siteman3direxp=''
siteprefix='/Users/ether/perl5/perlbrew/perls/19.11'
siteprefixexp='/Users/ether/perl5/perlbrew/perls/19.11'
sitescript='/Users/ether/perl5/perlbrew/perls/19.11/bin'
sitescriptexp='/Users/ether/perl5/perlbrew/perls/19.11/bin'
sizesize='8'
sizetype='size_t'
sleep=''
smail=''
so='dylib'
sockethdr=''
socketlib=''
socksizetype='socklen_t'
sort='sort'
spackage='Perl5'
spitshell='cat'
srand48_r_proto='0'
srandom_r_proto='0'
src='.'
ssizetype='ssize_t'
st_ino_sign='1'
st_ino_size='8'
startperl='#!/Users/ether/perl5/perlbrew/perls/19.11/bin/perl5.19.11'
startsh='#!/bin/sh'
static_ext=' '
stdchar='char'
stdio_base='((fp)->_ub._base ? (fp)->_ub._base : (fp)->_bf._base)'
stdio_bufsiz='((fp)->_ub._base ? (fp)->_ub._size : (fp)->_bf._size)'
stdio_cnt='((fp)->_r)'
stdio_filbuf=''
stdio_ptr='((fp)->_p)'
stdio_stream_array=''
strerror_r_proto='0'
strings='/usr/include/string.h'
submit=''
subversion='11'
sysman='/usr/share/man/man1'
sysroot=''
tail=''
tar=''
targetarch=''
targetdir=''
targetenv=''
targethost=''
targetmkdir=''
targetport=''
targetsh='/bin/sh'
tbl=''
tee=''
test='test'
timeincl='/usr/include/sys/time.h '
timetype='time_t'
tmpnam_r_proto='0'
to=':'
touch='touch'
tr='tr'
trnl='\n'
troff=''
ttyname_r_proto='0'
u16size='2'
u16type='unsigned short'
u32size='4'
u32type='unsigned int'
u64size='8'
u64type='unsigned long'
u8size='1'
u8type='unsigned char'
uidformat='"u"'
uidsign='1'
uidsize='4'
uidtype='uid_t'
uname='uname'
uniq='uniq'
uquadtype='unsigned long'
use5005threads=''
use64bitall='define'
use64bitint='define'
usecrosscompile=''
usedevel='define'
usedl='define'
usedtrace=''
usefaststdio=''
useithreads=''
usekernprocpathname=''
uselargefiles='define'
uselongdouble=''
usemallocwrap='define'
usemorebits=''
usemultiplicity=''
usemymalloc='n'
usenm='false'
usensgetexecutablepath='define'
useopcode='true'
useperlio='define'
useposix='true'
usereentrant=''
userelocatableinc=''
useshrplib='false'
usesitecustomize=''
usesocks=''
usethreads=''
usevendorprefix=''
useversionedarchname=''
usevfork='true'
usrinc='/usr/include'
uuname=''
uvXUformat='"lX"'
uvoformat='"lo"'
uvsize='8'
uvtype='unsigned long'
uvuformat='"lu"'
uvxformat='"lx"'
vaproto='define'
vendorarch=''
vendorarchexp=''
vendorbin=''
vendorbinexp=''
vendorhtml1dir=' '
vendorhtml1direxp=''
vendorhtml3dir=' '
vendorhtml3direxp=''
vendorlib=''
vendorlib_stem=''
vendorlibexp=''
vendorman1dir=' '
vendorman1direxp=''
vendorman3dir=' '
vendorman3direxp=''
vendorprefix=''
vendorprefixexp=''
vendorscript=''
vendorscriptexp=''
version='5.19.11'
version_patchlevel_string='version 19 subversion 11'
versiononly='define'
vi=''
xlibpth='/usr/lib/386 /lib/386'
yacc='yacc'
yaccflags=''
zcat=''
zip='zip'
-- 
           "If you're gonna be dumb, you gotta be tough. Personally,
              I'm trying to be less dumb." - sriddy@dropzone.com
            .             .            .            .             .
Karen Etheridge, karen@etheridge.ca       GCS C+++$ USL+++$ P+++$ w--- M++

@p5pRT
Copy link
Author

p5pRT commented May 26, 2014

From @tonycoz

On Fri May 09 14​:25​:09 2014, ether@​cpan.org wrote​:

This code​:

use strict;
use warnings FATAL => qw(once);
print @​Foo​::bar, "\n";
print "still alive\n";

Should be fatal. Instead, it prints​:

Name "Foo​::bar" used only once​: possible typo at foo.pl line 3.

still alive

(Behaviour is the same with "use warnings FATAL => 'all'".)

The cause I think is that the checks for WARN_ONCE aren't done until after compilation is complete and before execution starts, so PL_curcop isn't the cop where the global is being referenced.

The warning itself is suppressed as the code is compiled by Perl_gv_fetchpvn_flags() which sets GvMULTI_on() on the gv if WARN_ONCE isn't set.

I don't see a simple way to fix it.

Tony

@p5pRT
Copy link
Author

p5pRT commented May 26, 2014

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

@jkeenan
Copy link
Contributor

jkeenan commented Oct 29, 2023

From @tonycoz

On Fri May 09 14​:25​:09 2014, ether@​cpan.org wrote​:

This code​:
use strict;
use warnings FATAL => qw(once);
print @​Foo​::bar, "\n";
print "still alive\n";
Should be fatal. Instead, it prints​:
Name "Foo​::bar" used only once​: possible typo at foo.pl line 3.
still alive
(Behaviour is the same with "use warnings FATAL => 'all'".)

The cause I think is that the checks for WARN_ONCE aren't done until after compilation is complete and before execution starts, so PL_curcop isn't the cop where the global is being referenced.

The warning itself is suppressed as the code is compiled by Perl_gv_fetchpvn_flags() which sets GvMULTI_on() on the gv if WARN_ONCE isn't set.

I don't see a simple way to fix it.

Tony

@tonycoz , @karenetheridge , is this ticket closable?

@jkeenan jkeenan added Closable? We might be able to close this ticket, but we need to check with the reporter and removed distro-darwin labels Oct 29, 2023
@tonycoz tonycoz self-assigned this Oct 29, 2023
@tonycoz tonycoz removed the Closable? We might be able to close this ticket, but we need to check with the reporter label Oct 29, 2023
@tonycoz
Copy link
Contributor

tonycoz commented Oct 29, 2023

I think it's fixable by adding a GV flag to indicate warnings were fatal when the name was seen.

I've added this to my assigned list, though if anyone else wants to look at it they're welcome to try.

tonycoz added a commit to tonycoz/perl5 that referenced this issue Dec 5, 2023
"used only once" warnings are special, instead of being emitted at
the code where the name in question is used, they are emitted during
a scan of the symbol table done after parsing has finished.

This meant that any FATAL flags set in the COP for the parse point of
the name is no longer in scope, so the warnings we emit can't be
treated as fatal.

To make them behave as FATAL set a new flag on the name if fatal
WARN_ONCE warnings are enabled and use that to dispatch the warnings
as normal or fatally when we do the symbol table scan.

I originally approached the dispatch as fatal or non-fatal by messing
around with cop_warnings, but that was dumb, and I went for a much
simpler change.

Fixes Perl#13814
tonycoz added a commit to tonycoz/perl5 that referenced this issue Dec 5, 2023
"used only once" warnings are special, instead of being emitted at
the code where the name in question is used, they are emitted during
a scan of the symbol table done after parsing has finished.

This meant that any FATAL flags set in the COP for the parse point of
the name is no longer in scope, so the warnings we emit can't be
treated as fatal.

To make them behave as FATAL set a new flag on the name if fatal
WARN_ONCE warnings are enabled and use that to dispatch the warnings
as normal or fatally when we do the symbol table scan.

I originally approached the dispatch as fatal or non-fatal by messing
around with cop_warnings, but that was dumb, and I went for a much
simpler change.

Fixes Perl#13814
tonycoz added a commit to tonycoz/perl5 that referenced this issue Dec 7, 2023
"used only once" warnings are special, instead of being emitted at
the code where the name in question is used, they are emitted during
a scan of the symbol table done after parsing has finished.

This meant that any FATAL flags set in the COP for the parse point of
the name is no longer in scope, so the warnings we emit can't be
treated as fatal.

To make them behave as FATAL set a new flag on the name if fatal
WARN_ONCE warnings are enabled and use that to dispatch the warnings
as normal or fatally when we do the symbol table scan.

I originally approached the dispatch as fatal or non-fatal by messing
around with cop_warnings, but that was dumb, and I went for a much
simpler change.

Fixes Perl#13814
tonycoz added a commit that referenced this issue Dec 7, 2023
"used only once" warnings are special, instead of being emitted at
the code where the name in question is used, they are emitted during
a scan of the symbol table done after parsing has finished.

This meant that any FATAL flags set in the COP for the parse point of
the name is no longer in scope, so the warnings we emit can't be
treated as fatal.

To make them behave as FATAL set a new flag on the name if fatal
WARN_ONCE warnings are enabled and use that to dispatch the warnings
as normal or fatally when we do the symbol table scan.

I originally approached the dispatch as fatal or non-fatal by messing
around with cop_warnings, but that was dumb, and I went for a much
simpler change.

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

Successfully merging a pull request may close this issue.

4 participants