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

Tied hash can't be accessed via glob #874

p5pRT opened this issue Nov 18, 1999 · 2 comments

Tied hash can't be accessed via glob #874

p5pRT opened this issue Nov 18, 1999 · 2 comments


Copy link

p5pRT commented Nov 18, 1999

Migrated from (status was 'resolved')

Searchable as RT1805$

Copy link

p5pRT commented Nov 18, 1999

From @mjdominus

I tie a hash, then return the glob that contains it.
Access to the hash through the glob ignores the tie.

  my $glob = P​::new;
  $glob->{'please die'} = 'now';
  die "It didn't work.\n";
  package P;
  sub new {
  tie %F => P;
  sub TIEHASH {
  bless \"dummy" => P;
  sub STORE {
  die "I am the STORE method\n";

This package P ties the hash %F, then returns the glob *F. Access to
%F via the glob should invoke P​::STORE, which will abort the program,
but P​::STORE is never called.

The behavior is the same on 5.005_02, _55, _56, _57, _61, and _62.

Perl Info

This perlbug was built using Perl 5.00502 - Sun Oct 18 04:25:09 CDT 1998
It is being executed now by  Perl 5.00556 - Wed May 19 22:26:34 EDT 1999.

Site configuration information for perl 5.00502:

Configured by root at Sun Oct 18 04:25:09 CDT 1998.

Summary of my perl5 (5.0 patchlevel 5 subversion 2) configuration:
    osname=linux, osvers=2.0.35, archname=i586-linux
    uname='linux darkstar 2.0.35 #10 tue oct 13 18:04:13 cdt 1998 i586 unknown '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef useperlio=undef d_sfio=undef
    cc='cc', optimize='-O2', gccversion=
    cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include'
    stdchar='char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /shlib /lib /usr/lib
    libs=-lndbm -lgdbm -ldbm -ldb -ldl -lm -lc
    libc=/lib/, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches:

@INC for perl 5.00502:

Environment for perl 5.00502:
    LANG (unset)
    LANGUAGE (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Copy link

p5pRT commented Nov 18, 1999

From @mjdominus

Please disregard this report. My test script was broken.

my $glob = P​::new;

This does not call &P​::new.

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

No branches or pull requests

1 participant