Add ARM files
[dh-make-perl] / dev / arm / liburi-perl / liburi-perl-1.35.dfsg.1 / t / storable-test.pl
1 #!perl -w
2
3 use strict;
4 use Storable;
5
6 if (@ARGV && $ARGV[0] eq "store") {
7     require URI;
8     require URI::URL;
9     my $a = {
10         u => new URI('http://search.cpan.org/'),
11     };
12     print "# store\n";
13     store [URI->new("http://search.cpan.org")], 'urls.sto';
14 } else {
15     print "# retrieve\n";
16     my $a = retrieve 'urls.sto';
17     my $u = $a->[0];
18     #use Data::Dumper; print Dumper($a);
19
20     print "not " unless $u eq "http://search.cpan.org";
21     print "ok 1\n";
22
23     print "not " unless $u->scheme eq "http";
24     print "ok 2\n";
25
26     print "not " unless ref($u) eq "URI::http";
27     print "ok 3\n";
28 }