Subject: | Can't use string ("Games::Go::SGF::Node::move") as a subroutine ref |
Test program:
---
#!/usr/bin/perl
use Games::Go::SGF;
my $sgfdata = "(;GM[1]FF[4]SZ[19]KM[5.50];B[pd](;W[nc])(;W[qf]))";
my $sgf = new Games::Go::SGF( $sgfdata );
print "Game played on ".$sgf->date."\n";
print $sgf->white. " (W) vs. ".$sgf->black." (B)\n";
print "Board size: ".$sgf->size.". Komi: ".$sgf->komi."\n";
while ($move = $sgf->move($move_no++)) {
print "$move_no: ".$move->move,"\n";
}
---
Output:
---
Game played on
(W) vs. (B)
Board size: 19. Komi: 5.50
1:
2: pd
Can't use string ("Games::Go::SGF::Node::move") as a subroutine ref while
"strict refs" in use at /usr/lib/perl5/site_perl/5.8.5/Games/Go/SGF.pm line
83.
---
$ perl -v
This is perl, v5.8.5 built for i386-linux-thread-multi
(with 1 registered patch, see perl -V for more detail)