Skip Menu |

This queue is for tickets about the Games-Go-SGF CPAN distribution.

Report information
The Basics
Id: 5814
Status: new
Priority: 0/
Queue: Games-Go-SGF

People
Owner: Nobody in particular
Requestors: ilya [...] martynov.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] fix error on SGF object destruction in modern perls
On modern perls when Games::Go::SGF object gets destroyed there is an error: (in cleanup) Can't use string ("Games::Go::SGF::Node::DESTROY") as a subroutine ref while "strict refs" in use at /home/ilya/perl-5.8.2-threads/lib/site_perl/5.8.2/Games/Go/SGF.pm line 83. Following patch fixes a problem: --- /home/ilya/perl-5.8.2-threads/lib/site_perl/5.8.2/Games/Go/SGF.pm Tue Oct 30 16:18:58 2001 +++ SGF.pm Fri Mar 26 11:11:23 2004 @@ -83,6 +83,10 @@ &$AUTOLOAD($_[0]->mainline, @_[1..@_]); } +# Empty destructor to make sure AUTOLOAD doesn't get called +# on object destruction. +sub DESTROY { } + package Games::Go::SGF::Node; sub move { my $node = shift; $node->{B} || $node->{W} }