squash perl 5.12 warning
[bioperl-db.git] / scripts / biosql / load_interpro.pl
bloba42c4bbf87b3d89b9ea1ca7f2a6f61004cfc28bc
1 # $Id$
3 # Cared for by Juguang Xiao, juguang@tll.org.sg
5 # Copyright Juguang Xiao
7 # You may distribute this script under the same terms as perl itself
10 # Note that the functionality of using the SAX event handler for
11 # parsing InterPro should by now be integrated into the main
12 # load_ontology.pl script. Let me know if that doesn't work for you
13 # for some reason.
15 # I'll leave this script here around for a while until there is enough
16 # evidence that it all works through load_ontology.pl as well, so don't be
17 # confused.
19 # -Hilmar, hlapp at gmx.net
21 use strict;
22 use Bio::OntologyIO::Handlers::InterPro_BioSQL_Handler;
23 use XML::Parser::PerlSAX;
24 use Bio::DB::EasyArgv;
25 use Getopt::Long;
28 my $db = get_biosql_db_from_argv;
29 my ($file, $version);
30 GetOptions(
31 'file=s' => \$file,
32 'version=s' => \$version
35 my $handler = Bio::OntologyIO::Handlers::InterPro_BioSQL_Handler->new(
36 -db => $db,
37 -version => "version $version"
39 my $parser = XML::Parser::PerlSAX->new(Handler=>$handler);
40 my $ret = $parser->parse(Source=>{SystemId=>$file});