All pastes #2058248 Raw Edit

Anonymous

public text v1 · immutable
#2058248 ·published 2011-05-13 14:04 UTC
rendered paste body
BEGIN {
        $CHECK = 1;
        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 ) {
                $CHECK = "XML::TreeBuilder";
        }
        #"None of @DBs loaded" unless $found;
}