6 binmode STDOUT, ":utf8";
7 GetOptions(\%options, "l=s", "b=s", "d") || exit 1;
10 @list = Anime::ANN::getlist($options{"l"});
11 foreach $name (@list) {
19 $browse = $options{"b"};
20 } elsif($options{"d"}) {
21 $browse = `basename "\$(pwd)"`;
24 $id = Anime::ANN::getid $browse;
26 exec "htmlview", Anime::ANN::geturl($id);
28 printf STDERR "could not find " . $browse . "\n";
33 if(!defined($ARGV[0])) {
34 printf STDERR "usage: anndata NAME\n";
38 unless($id = Anime::ANN::getid $ARGV[0]) {
39 printf STDERR "could not find $ARGV[0]\n";
43 $info = Anime::ANN::getseries $id;
53 if(ref $ref eq "HASH") {
54 for $key (sort keys %{$ref}) {
55 print ((" " x $ind) . "$key: " . (" " x (20 - length $key)) . "(" . $ref->{$key} . ")\n");
56 refdump($ref->{$key}, $ind + 1) if ref $ref->{$key};
58 } elsif(ref $ref eq "ARRAY") {
59 for($i = 0; $i < @{$ref}; $i++) {
60 print ((" " x $ind) . "$i: " . $ref->[$i] . "\n");
61 refdump($ref->[$i], $ind + 1) if ref $ref->[$i];
63 } elsif(ref $ref eq "SCALAR") {
64 print ((" " x $ind) . $$ref . "\n");
66 print ((" " x $ind) . "Unknown ref: $ref\n");