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

[BUG 5.005_61] Hash slices not working on compile-time pseudohashes #621

Closed
p5pRT opened this issue Sep 20, 1999 · 3 comments
Closed

[BUG 5.005_61] Hash slices not working on compile-time pseudohashes #621

p5pRT opened this issue Sep 20, 1999 · 3 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 20, 1999

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

Searchable as RT1485$

@p5pRT
Copy link
Author

p5pRT commented Sep 20, 1999

From The RT System itself

sub new { bless [] }

package main;

my Class $obj = Class->new;
@​{$obj}{qw(foo bar)} = ("this", "that");
print $obj->{foo};

This dies with "Can't coerce array into hash".

If the constructor is changed to "sub new { bless [\%FIELDS] }" then
it all works fine.

I presume this is some bug/oversight in compile-time AVHVs as opposed
to those which are defined at runtime.

--

Michael G Schwern schwern@​pobox.com
  http​://www.pobox.com/~schwern
  /(?​:(?​:(1)[.-]?)?\(?(\d{3})\)?[.-]?)?(\d{3})[.-]?(\d{4})(x\d+)?/i

@p5pRT
Copy link
Author

p5pRT commented Jul 18, 2003

From @schwern

Bug still exists in 5.8.1 RC2 but pseudo-hashes are going away in 5.10.

@p5pRT
Copy link
Author

p5pRT commented Jul 18, 2003

@schwern - Status changed from 'stalled' to 'resolved'

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

No branches or pull requests

1 participant