Alien-bz2-Installer

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    queried to retrieve the settings needed to interact with bz2 via XS or
    FFI::Raw.

 versions_available

     my @versions = Alien::bz2::Installer->versions_available;
     my $latest_version = $version[-1];

    Returns the list of versions of bzip2 available on the Internet. Will
    throw an exception if available versions cannot be determined.

 fetch

     my($location, $version) = Alien::bz2::Installer->fetch(%options);
     my $location = Alien::bz2::Installer->fetch(%options);

    NOTE: using this method may (and probably does) require modules
    returned by the build_requires method.

    Download the bz2 source from the internet. By default it will download
    the latest version t a temporary directory, which will be removed when
    Perl exits. Will throw an exception on failure. Options include:

    dir

      Directory to download to

    version

      Version to download

 build_requires

     my $prereqs = Alien::bz2::Installer->build_requires;
     while(my($module, $version) = each %$prereqs)
     {
       ...
     }

    Returns a hash reference of the build requirements. The keys are the
    module names and the values are the versions.

    The requirements may be different depending on your platform.

 system_requires

    This is like build_requires, except it is used when using the bz2 that
    comes with the operating system.

 system_install

     my $installer = Alien::bz2::Installer->system_install(%options);

    NOTE: using this method may require modules returned by the
    system_requires method.

    Options:

    test

      Specifies the test type that should be used to verify the integrity
      of the system bz2. Generally this should be set according to the
      needs of your module. Should be one of:

      compile

	use test_compile_run to verify. This is the default.

      ffi

	use test_ffi to verify

      both

	use both test_compile_run and test_ffi to verify

    alien

      If true (The default) then an existing Alien::bz2 will be used if
      found. Usually this is what you want.

 build_install

     my $installer = Alien::bz2::Installer->build_install( '/usr/local', %options );

    NOTE: using this method may (and probably does) require modules
    returned by the build_requires method.

    Build and install bz2 into the given directory. If there is an error an
    exception will be thrown. On a successful build, an instance of
    Alien::bz2::Installer will be returned.

    These options may be passed into build_install:

    tar

      Filename where the bz2 source tar is located. If not specified the
      latest version will be downloaded from the Internet.

    dir

      Empty directory to be used to extract the bz2 source and to build
      from.

    test

      Specifies the test type that should be used to verify the integrity
      of the build after it has been installed. Generally this should be
      set according to the needs of your module. Should be one of:

      compile

	use test_compile_run to verify. This is the default.

      ffi

	use test_ffi to verify

      both

	use both test_compile_run and test_ffi to verify

ATTRIBUTES

    Attributes of an Alien::bz2::Installer provide the information needed
    to use an existing bz2 (which may either be provided by the system, or
    have just been built using build_install.

 cflags

    The compiler flags required to use bz2.

 libs

    The linker flags and libraries required to use bz2.

 dlls

    List of DLL or .so (or other dynamic library) files that can be used by
    FFI::Raw or similar.

 version

    The version of bz2

INSTANCE METHODS

 test_compile_run

     if($installer->test_compile_run(%options))
     {
       # You hae a working bz2
     }
     else
     {
       die $installer->error;
     }

    Tests the compiler to see if you can build and run a simple bz2
    program. On success it will return the bz2 version. Other options
    include

    cbuilder

      The ExtUtils::CBuilder instance that you want to use. If not
      specified, then a new one will be created.

    dir

      Directory to use for building the executable. If not specified, a
      temporary directory will be created and removed when Perl terminates.

    quiet

      Passed into ExtUtils::CBuilder if you do not provide your own
      instance. The default is true (unlike ExtUtils::CBuilder itself).

 test_ffi

     if($installer->test_ffi(%options))
     {



( run in 0.964 second using v1.01-cache-2.11-cpan-13bb782fe5a )