#!/usr/local/bin/perl

use strict;
use warnings;

use Astro::SIMBAD::Client;
use File::Basename;
@ARGV or do {print <<eod; exit};

Query SIMBAD 4 for the objects on the command line. The format provided
by Astro::SIMBAD is cleared so you get the full effect.

usage: @{[basename $0]} object ...

eod

my $simbad = Astro::SIMBAD::Client->new (
    type => 'txt',
    format => {txt => ''},
    parser => {txt => ''},
);

foreach my $obj (@ARGV) {
    eval {
	print $simbad->query (id => $obj), "\n";
    };
    print $@ if $@;
}
__END__

Copyright 2006 by Thomas R. Wyant, III (F<wyant at cpan dot org>).
All rights reserved.

This script is free software; you can use it, redistribute it
and/or modify it under the same terms as Perl itself. Please see
L<http://perldoc.perl.org/index-licence.html> for the current licenses.

