Alien-Libjio

 view release on metacpan or  search on metacpan

lib/Alien/Libjio.pm  view on Meta::CPAN

In scalar context, it returns an array reference suitable for passing to
other build systems, particularly L<Module::Build>. In list context, it gives
a normal array so that C<join> and friends will work as expected.

Example code:

  my $ldflags = $jio->ldflags;
  my @ldflags = @{ $jio->ldflags };
  my $ldstring = join(' ', $jio->ldflags);
  # or:
  # my $ldflags = $jio->linker_flags;

=head2 $jio->cflags

=head2 $jio->compiler_flags

This method returns the compiler option flags to compile C code which uses
the libjio library (typically in the CFLAGS variable). It is particularly
useful for building and installing Perl XS modules such as L<IO::Journal>.

Example code:

  my $cflags = $jio->cflags;
  my @cflags = @{ $jio->cflags };
  my $ccstring = join(' ', $jio->cflags);
  # or:
  # my $cflags = $jio->compiler_flags;

=head2 $jio->method

=head2 $jio->how

This method returns the method the module used to find information about
libjio. The following methods are currently used (in priority order):

=over

=item *

pkg-config: the de-facto package information tool

=item *

ExtUtils::Liblist: a utility module used by ExtUtils::MakeMaker

=back

Example code:

  if ($jio->installed) {
    print 'I found this information using: ', $jio->how, "\n";
  }

=head1 ACKNOWLEDGEMENTS

=over

=item *

Special thanks to Alberto Bertogli E<lt>albertito@blitiri.com.arE<gt> for
developing this useful library and for releasing it into the public domain.

=back

=head1 SEE ALSO

L<IO::Journal>, a Perl module that provides an interface to libjio.

L<http://blitiri.com.ar/p/libjio/>, Alberto Bertogli's page about libjio,
which explains the purpose and features of libjio.

=head1 CAVEATS

=over

=item *

This module can only search known/common paths for libjio installations.
It does try to use B<pkg-config> and B<ExtUtils::Liblist> to find a libjio
installation on your system, but it cannot predict where files might have
been installed. As a result, this package might install a duplicate copy
of libjio.

=item *

There is currently no way to save a custom library installation path for
libjio. This is likely to change in the future.

=item *

B<pkg-config> may fail if you have an insecure $ENV{PATH} variable. Due to
the way IPC::Open3 works, taintedness exceptions are suppressed and pkg-config
seems to fail for no reason. The recommended fix for this is to use a module
like L<Env::Sanctify::Auto> or to otherwise clean up the calling environment.
Another workaround is to disable taint checking, but that's not recommended.
(See: L<http://rt.perl.org/rt3/Ticket/Display.html?id=66572>)

=back

1;

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Alien-Libjio

When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.

=head1 AUTHOR

Jonathan Yu <jawnsy@cpan.org>

=head1 COPYRIGHT AND LICENSE

Legally speaking, this package and its contents are:

  Copyright (c) 2011 by Jonathan Yu <jawnsy@cpan.org>.

But this is really just a legal technicality that allows the author to
offer this package under the public domain and also a variety of licensing
options. For all intents and purposes, this is public domain software,
which means you can do whatever you want with it.

The software is provided "AS IS", without warranty of any kind, express or
implied, including but not limited to the warranties of merchantability,
fitness for a particular purpose and noninfringement. In no event shall the
authors or copyright holders be liable for any claim, damages or other
liability, whether in an action of contract, tort or otherwise, arising from,
out of or in connection with the software or the use or other dealings in
the software.

=cut



( run in 0.551 second using v1.01-cache-2.11-cpan-d7f47b0818f )