diff --git a/Build.PL b/Build.PL index 116a8d9..40bb93f 100644 --- a/Build.PL +++ b/Build.PL @@ -49,6 +49,7 @@ my $builder = $builder_class->new( 'Force' => {default => 0}, 'ShareDir' => {default => 0}, 'Version' => {type => '=s', default => 0}, + #'GSLCheck' => {default => 0}, }, share_dir => 'share_dir', meta_merge => { diff --git a/Changes b/Changes index 845c1d3..aa70537 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,9 @@ Revision history for Perl extension Alien::GSL. 0.03 - uses Module::Build + - has platform specific instruction + - download and compile when possible + - download precompiled library on MSWindows 0.02 Mon Aug 1 - version incremented as upload to PAUSE wasn't complete diff --git a/lib/Alien/GSL.pm b/lib/Alien/GSL.pm index 28854d6..c98c04b 100644 --- a/lib/Alien/GSL.pm +++ b/lib/Alien/GSL.pm @@ -3,7 +3,7 @@ package Alien::GSL; use strict; use warnings; -our $VERSION = 0.03; +our $VERSION = 0.030_001; $VERSION = eval $VERSION; use Carp; @@ -42,18 +42,35 @@ L uses the L system for installation. Therefore the u It will try (at a minimum) to detect if the GSL library is installed on the local system. If not it will attempt, if possible, to download/build/install it. This build process will likely require the C script to be run with root privaledges. Future versions of L may try to avoid this problem. This is not necessary if the library is already installed on the system. -=head2 PerlBrew/CPANminus +=head2 Build Flags -If using L to manage local installations of the Perl interpreter, I believe that +When running C<./Build>, certain command line flags may be passed, i.e. C<./Build --ShareDir>. - cpanm --sudo Alien::GSL +=over + +=item C<--Version 1.15> + +Specify a version of the GSL library to be installed (here C<1.15>). Without this flag, the highest (read: newest) version available will be used. If a supplied version cannot be found, the install will croak. + +=item C<--ShareDir> + +When this flag is given, C will be used, even if a system install was possible (i.e. on Linux as root). + +=item C<--Force> -will work more correctly than either of +When this flad is given, action will be taken, even if a system install of GSL is found. Note that this flag is not needed if C<--ShareDir> is used. - sudo cpanm Alien::GSL - sudo cpan Alien::GSL +=item C<--Dir dir> + +Specify a directory (here C) to download and build the library. This directory will not be removed later. + +=item C<--TempDir /dev/shm> + +Specify a location for the temporary (here C, the ramdisk on Ubuntu Linux). + +=back -=head1 EXPORTS +=head1 NO EXPORTS Currently this module does not export any functions or variables. Use instead the fully qualified symbol name, i.e. C. @@ -65,7 +82,7 @@ This module is in an alpha state. The author hopes that major functionality will These functions are basically a functional interface to the C utility command. -=head2 gsl_version +=head2 C Takes no options, returns the version number of the installed GSL library. @@ -89,7 +106,7 @@ sub gsl_version { return $version; } -=head2 require_gsl_version( [$version] ); +=head2 C A wrapper around C which (optionally) takes a number specifying a minimum GSL version, returns the GSL version if it is greater than or equal to that specified. Returns zero otherwise. May also be called with zero as the version parameter, or no parameter at all, in which case the behavior is the same as C. @@ -114,7 +131,7 @@ sub require_gsl_version { } -=head2 gsl_prefix +=head2 C Takes no options, returns the "GSL installation prefix". @@ -138,7 +155,7 @@ sub gsl_prefix { return $prefix; } -=head2 gsl_libs( [opts hash or hash reference] ) +=head2 C Takes an optional hash or hash reference, returns "library linking information". A hash key C, whose value is false will return the "library linking information, without cblas", though by default the cblas information is included. @@ -186,7 +203,7 @@ sub gsl_libs { return $libs; } -=head2 gsl_cflags +=head2 C Takes no options, returns the "pre-processor and compiler flags". @@ -214,6 +231,24 @@ sub gsl_cflags { return $cflags; } +=head1 TODO + +=over + +=item * + +Implement C<--GSLCheck> flag to run C during build. + +=item * + +Improve tests for C + +=item * + +Are tests possible for C subclasses? + +=back + =head1 SEE ALSO =over