1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
package Term::Choose::Portable; use strict; use Exporter 'import'; our @EXPORT_OK = qw(choose); if ( $^O eq 'MSWin32' ) { require Term::Choose::Win32; #*choose = \&Term::Choose::Win32::choose; Term::Choose::Win32::->import( 'choose' ); } else { require Term::Choose; #*choose = \&Term::Choose::choose; Term::Choose::->import( 'choose' ); } 1;