develooper Front page | perl.perl5.porters | Postings from March 2014

Re: [perl #121477] tied hash store loses value regexpness

Thread Previous
From:
perl.p5p
Date:
March 20, 2014 20:51
Subject:
Re: [perl #121477] tied hash store loses value regexpness
Message ID:
20140320205137.GA12263@cancer.codesimply.com
This program may more clearly demonstrate the problem for other readers:

  use 5.19.9;
  use Tie::Hash;

  my $qr = qr/foo/;
  say ref \${ $qr };

  {
    my %h;
    $h{qr} = $$qr;
    say ref \$h{qr};
  }

  {
    tie my %h, 'Tie::StdHash';
    $h{qr} = $$qr;
    say ref \$h{qr};
  }

-- 
rjbs

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About