Hi,
I just wanted a sanity check before I file a patch for this bug as it's
only on a new 5.10.1 system we are just building out.
On Bric 1.11.2, we are getting compilation errors with perl 5.10.1:
Not a GLOB reference at lib/Bric/Util/Burner/PHP.pm line 74.
which is from this snippet:
no strict 'refs';
while ( my ($k, $v) = each %{TEMPLATE_BURN_PKG . '::'} ) {
if (my $type = first { defined *{$v}{$_} }
qw(CODE HASH ARRAY IO GLOB FORMAT)
) {
# Use the reference to the variable. IOs can be used directly.
$vars{$k} = *{$v}{$type};
}
This test script:
use strict;
use warnings;
use constant test => 1;
no strict "refs";
my $k = "test";
my $v = ${'main::'}{$k};
print "key ($k) val ($v)\n";
print defined *{$v}{CODE} . "\n";
shows the issue:
key (test) val (SCALAR(0x64d960))
Not a GLOB reference at test.pl line 8.
On 5.8.8 I see:
key (test) val (*main::test)
1
as expected.
It looks like as of 5.10 we now have non globs in the stash so may need
to check for that before treating the value as a glob ref.
Thoughts?
Alex
--
Alex Krohn <alex@gossamer-threads.com>
Gossamer Threads Inc. http://www.gossamer-threads.com/
Tel: (604) 687-5804 Fax: (604) 687-5806
I just wanted a sanity check before I file a patch for this bug as it's
only on a new 5.10.1 system we are just building out.
On Bric 1.11.2, we are getting compilation errors with perl 5.10.1:
Not a GLOB reference at lib/Bric/Util/Burner/PHP.pm line 74.
which is from this snippet:
no strict 'refs';
while ( my ($k, $v) = each %{TEMPLATE_BURN_PKG . '::'} ) {
if (my $type = first { defined *{$v}{$_} }
qw(CODE HASH ARRAY IO GLOB FORMAT)
) {
# Use the reference to the variable. IOs can be used directly.
$vars{$k} = *{$v}{$type};
}
This test script:
use strict;
use warnings;
use constant test => 1;
no strict "refs";
my $k = "test";
my $v = ${'main::'}{$k};
print "key ($k) val ($v)\n";
print defined *{$v}{CODE} . "\n";
shows the issue:
key (test) val (SCALAR(0x64d960))
Not a GLOB reference at test.pl line 8.
On 5.8.8 I see:
key (test) val (*main::test)
1
as expected.
It looks like as of 5.10 we now have non globs in the stash so may need
to check for that before treating the value as a glob ref.
Thoughts?
Alex
--
Alex Krohn <alex@gossamer-threads.com>
Gossamer Threads Inc. http://www.gossamer-threads.com/
Tel: (604) 687-5804 Fax: (604) 687-5806