Graham Ollis > Alien-bz2-0.12 > Alien::bz2

Download:
Alien-bz2-0.12.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.12   Source  

NAME ^

Alien::bz2 - Build and make available bz2

VERSION ^

version 0.12

SYNOPSIS ^

Build.PL

 use Alien::bz2;
 use Module::Build;
 
 my $alien = Alien::bz2->new;
 my $build = Module::Build->new(
   ...
   extra_compiler_flags => $alien->cflags,
   extra_linker_flags   => $alien->libs,
   ...
 );
 
 $build->create_build_script;

Makefile.PL

 use Alien::bz2;
 use ExtUtils::MakeMaker;
 
 my $alien = Alien::bz2;
 WriteMakefile(
   ...
   CFLAGS => $alien->cflags,
   LIBS   => $alien->libs,
 );

FFI::Raw

 use Alien::bz2;
 use FFI::Raw;
 
 my($dll) = Alien::bz2->new->dlls;
 FFI::Raw->new($dll, 'BZ2_bzlibVersion', FFI::Raw::str);

FFI::Sweet

 use Alien::bz2;
 use FFI::Sweet;
 
 ffi_lib( Alien::bz2->new->dlls );
 attach_function 'BZ2_bzlibVersion', [], _str;

DESCRIPTION ^

If you just want to compress or decompress bzip2 data in Perl you probably want one of Compress::Bzip2, Compress::Raw::Bzip2 or IO::Compress::Bzip2.

This distribution installs bz2 so that it can be used by other Perl distributions. If already installed for your operating system, and it can be found, this distribution will use the bz2 that comes with your operating system, otherwise it will download it from the internet, build and install it.

If you set the environment variable ALIEN_BZ2 to 'share', this distribution will ignore any system bz2 found, and build from source instead. This may be desirable if your operating system comes with a very old version of bz2 and an upgrade path for the system bz2 is not possible.

METHODS ^

cflags

Returns the C compiler flags necessary to build against bz2.

Returns flags as a list in list context and combined into a string in scalar context.

libs

Returns the library flags necessary to build against bz2.

Returns flags as a list in list context and combined into a string in scalar context.

dlls

Returns a list of dynamic libraries (usually a list of just one library) that make up bz2. This can be used for FFI::Raw.

Returns just the first dynamic library found in scalar context.

install_type

Returns the install type, one of either system or share.

SEE ALSO ^

Alien::bz2::Installer
Compress::Bzip2
Compress::Raw::Bzip2
IO::Compress::Bzip2

AUTHOR ^

Graham Ollis <plicease@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2014 by Graham Ollis.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: