# common routines used in tests

######################################################################
# handle canned responses
######################################################################
sub canned {
    my($base, $file) = @_;

    if(! exists $ENV{NET_AMAZON_LIVE_TESTS} ) {
        $file = File::Spec->catfile($base, $file);
        open FILE, "<$file" or die "Cannot open $file";
        my $data = join '', <FILE>;
        close FILE;
        push @Net::Amazon::CANNED_RESPONSES, $data;
    }
}

1;


syntax highlighted by Code2HTML, v. 0.9.1