All pastes #2058224 Raw Edit

Anonymous

public text v1 · immutable
#2058224 ·published 2011-05-13 13:44 UTC
rendered paste body


my $CHECK = '';
BEGIN {
        my ( $found, @DBs, $mod);
        $found = 0;
        @DBs = qw(XML::TreeBuilder);
        for $mod (@DBs) {
                if ( eval "require $mod") {
                        $mod-> import ();  #if needed
                        $found = 1;
                        last;
                }
        }
        if ( $found == 1 ) {
                use XML::TreeBuilder;
                $CHECK = "XML::TreeBuilder";
        }
        #"None of @DBs loaded" unless $found;
}