in reply to preferred loading of XS modules
my @modules=qw/Module::One_XS Module::Two_PP/; foreach my $module (@modules) { eval qq| use $module |; last unless $@ }
Update: As choroba astutely remarked the "next if $@" should be "last unless $@"
CountZero
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
My blog: Imperial Deltronics
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: preferred loading of XS modules
by choroba (Cardinal) on Nov 25, 2015 at 21:01 UTC | |
by CountZero (Bishop) on Nov 26, 2015 at 06:48 UTC |