6 binmode STDOUT, ":utf8";
7 GetOptions(\%options, "l=s", "b=s") || exit 1;
10 @list = Anime::ANN::getlist($options{"l"});
11 foreach $name (@list) {
18 $id = Anime::ANN::getid $options{"b"};
20 exec "htmlview", Anime::ANN::geturl($id);
22 printf STDERR "could not find " . $options{"b"} . "\n";
27 if(!defined($ARGV[0])) {
28 printf STDERR "usage: anndata NAME\n";
32 unless($id = Anime::ANN::getid $ARGV[0]) {
33 printf STDERR "could not find $ARGV[0]\n";
37 $info = Anime::ANN::getseries $id;
47 if(ref $ref eq "HASH") {
48 for $key (sort keys %{$ref}) {
49 print ((" " x $ind) . "$key: " . (" " x (20 - length $key)) . "(" . $ref->{$key} . ")\n");
50 refdump($ref->{$key}, $ind + 1) if ref $ref->{$key};
52 } elsif(ref $ref eq "ARRAY") {
53 for($i = 0; $i < @{$ref}; $i++) {
54 print ((" " x $ind) . "$i: " . $ref->[$i] . "\n");
55 refdump($ref->[$i], $ind + 1) if ref $ref->[$i];
57 } elsif(ref $ref eq "SCALAR") {
58 print ((" " x $ind) . $$ref . "\n");
60 print ((" " x $ind) . "Unknown ref: $ref\n");