diff --git a/lib/Bric/Changes.pod b/lib/Bric/Changes.pod index 7036e7193..fd0678968 100644 --- a/lib/Bric/Changes.pod +++ b/lib/Bric/Changes.pod @@ -103,6 +103,11 @@ broken by the switch to autocompleted category selection for new media documents in 1.11.3. Thanks to Waldo Jaquith and Iván Chavero for the spot (Bugs #134 and #135). [David] +=item * + +Fixed the "Not a GLOB reference" error when using the PHP burner on Perl 5.10. +[Alex Krohn] + =back =head1 Version 1.11.3 (2010-01-28) diff --git a/lib/Bric/Util/Burner/PHP.pm b/lib/Bric/Util/Burner/PHP.pm index eecee9614..5714b5c13 100755 --- a/lib/Bric/Util/Burner/PHP.pm +++ b/lib/Bric/Util/Burner/PHP.pm @@ -1,4 +1,4 @@ -package Bric::Util::Burner::PHP; +71package Bric::Util::Burner::PHP; ############################################################################### @@ -71,7 +71,10 @@ my %vars; do { no strict 'refs'; while ( my ($k, $v) = each %{TEMPLATE_BURN_PKG . '::'} ) { - if (my $type = first { defined *{$v}{$_} } + # Perl 5.10 stores constants in the symbol table as scalar refs + if (ref $v eq 'SCALAR') { + $vars{$k} = $$v; + } elsif (my $type = first { defined *{$v}{$_} } qw(CODE HASH ARRAY IO GLOB FORMAT) ) { # Use the reference to the variable. IOs can be used directly.