Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix the PHP burner on Perl 5.10.
  • Loading branch information
theory committed Feb 25, 2010
1 parent 24362f5 commit b05f7c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions lib/Bric/Changes.pod
Expand Up @@ -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)
Expand Down
7 changes: 5 additions & 2 deletions lib/Bric/Util/Burner/PHP.pm
@@ -1,4 +1,4 @@
package Bric::Util::Burner::PHP;
71package Bric::Util::Burner::PHP;

###############################################################################

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit b05f7c8

Please sign in to comment.