BioPerl-DB

 view release on metacpan or  search on metacpan

scripts/biosql/load_ontology.pl  view on Meta::CPAN

} else {
    # this is a truly OntologyIO compliant parser, or so I hope

    # loop over the input stream(s)
    while( my $ont = $ontin->$nextobj ) {
        # don't forget to add namespace if the parser doesn't supply one
        $ont->name($namespace) unless $ont->name();
        
        print STDERR "Loading ontology ",$ont->name(),":\n\t... terms\n";

        # in order to allow callbacks to the user and generally a
        # better ability to interfere with and customize the upload
        # process, we load all terms first here instead of simply
        # going for the relationships

        foreach my $term ($ont->get_all_terms()) {
            # call the persistence handler - there is only one right now
            persist_term('-term' => $term, @persist_args);
        }

        # after all terms have been processed, we run through the relationships

t/lib/Test/Harness/Straps.pm  view on Meta::CPAN



sub _analyze_iterator {
    my($self, $name, $it) = @_;

    $self->_reset_file_state;
    $self->{file} = $name;

    my $results = Test::Harness::Results->new;

    # Set them up here so callbacks can have them.
    $self->{totals}{$name} = $results;
    while( defined(my $line = $it->next) ) {
        $self->_analyze_line($line, $results);
        last if $self->{saw_bailout};
    }

    $results->set_skip_all( $self->{skip_all} ) if defined $self->{skip_all};

    my $passed =
        (($results->max == 0) && defined $results->skip_all) ||



( run in 2.604 seconds using v1.01-cache-2.11-cpan-9b1e4054eb1 )