From b7ae13c0aa3596e8c897b84e958649cb969bd7c9 Mon Sep 17 00:00:00 2001 From: fredrik Date: Mon, 5 Jun 2006 02:51:40 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/utils@642 959494ce-11ee-0310-bf91-de5d638817bd --- anndata | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/anndata b/anndata index 3cda2c2..fcc2a29 100755 --- a/anndata +++ b/anndata @@ -3,7 +3,7 @@ use Getopt::Long; use Anime::ANN; -GetOptions(\%options, ("l=s", "b=s")); +GetOptions(\%options, "l=s", "b=s") || exit 1; if($options{"l"}) { @list = Anime::ANN::getlist($options{"l"}); @@ -14,7 +14,13 @@ if($options{"l"}) { } if($options{"b"}) { - exec "htmlview", Anime::ANN::geturl(Anime::ANN::getid $options{"b"}); + $id = Anime::ANN::getid $options{"b"}; + if(defined($id)) { + exec "htmlview", Anime::ANN::geturl($id); + } else { + printf STDERR "could not find " . $options{"b"} . "\n"; + exit 1; + } } if(!defined($ARGV[0])) { @@ -47,6 +53,8 @@ sub refdump print ((" " x $ind) . "$i: " . $ref->[$i] . "\n"); refdump($ref->[$i], $ind + 1) if ref $ref->[$i]; } + } elsif(ref $ref eq "SCALAR") { + print ((" " x $ind) . $$ref . "\n"); } else { print ((" " x $ind) . "Unknown ref: $ref\n"); } -- 2.11.0