Switch to using dclone from Clone::clone due to bugs under
perl 5.10
This commit is contained in:
parent
ace2c81fca
commit
8ea45fe456
2 changed files with 13 additions and 11 deletions
|
|
@ -13,7 +13,8 @@ use Data::Dumper;
|
|||
use WebGUI::Test; # Must use this before any other WebGUI modules
|
||||
use WebGUI::Session;
|
||||
use JSON;
|
||||
use Clone qw/clone/;
|
||||
#use Clone qw/clone/;
|
||||
use Storable qw/dclone/;
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Init
|
||||
|
|
@ -21,7 +22,7 @@ my $session = WebGUI::Test->session;
|
|||
|
||||
#----------------------------------------------------------------------------
|
||||
# Tests
|
||||
my $tests = 95;
|
||||
my $tests = 96;
|
||||
plan tests => $tests + 1 + 3;
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
@ -2062,13 +2063,13 @@ sub buildSectionSkeleton {
|
|||
my $sections = [];
|
||||
my ($bareSection, $bareQuestion, $bareAnswer) = getBareSkeletons();
|
||||
foreach my $questionSpec ( @{ $spec } ) {
|
||||
my $section = clone $bareSection;
|
||||
my $section = dclone $bareSection;
|
||||
push @{ $sections }, $section;
|
||||
foreach my $answers ( @{$questionSpec} ) {
|
||||
my $question = clone $bareQuestion;
|
||||
my $question = dclone $bareQuestion;
|
||||
push @{ $section->{questions} }, $question;
|
||||
while ($answers-- > 0) {
|
||||
my $answer = clone $bareAnswer;
|
||||
my $answer = dclone $bareAnswer;
|
||||
push @{ $question->{answers} }, $answer;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue