sub import { my ($class, @args) = @_; shift @args if @args && exists $args[0] && defined $args[0] && $args[0] =~ /^[\d\.\_]{1,10}$/; Inline->import(Java => 'DATA', CLASSPATH=>$classpath, @args); } #### use XML::Saxon::XSLT2 CLASSPATH => "/path/to/saxonb.jar"; #### perl -MXML::Saxon::XSLT2=CLASSPATH,/path/to/saxonb.jar myscript.pl