All pastes #2058226 Raw Edit

Anonymous

public text v1 · immutable
#2058226 ·published 2011-05-13 13:48 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;
}
print "Check is $CHECK\n";
exit;