[Bioperl-l] $@#!$! backwards compatibility

Jason Stajich jason@chg.mc.duke.edu
Wed, 28 Feb 2001 14:26:13 -0500 (EST)


in perl 5.6.0 'exists' can be used to test if a method exists.  ie
exists(&File::Spec::tempdir)
but not in 5.004.  Does anyone know how else we can test this.  I am not
really keen on doing:

eval { 
	return File::Temp::tempdir(@args);
};
if( $@ ) {
	.... 
}

but I will if there is no other way.

Jason Stajich
jason@chg.mc.duke.edu
Center for Human Genetics
Duke University Medical Center 
http://www.chg.duke.edu/