Alien-LibJIT
view release on metacpan or search on metacpan
lib/Alien/LibJIT.pm view on Meta::CPAN
package Alien::LibJIT;
# ABSTRACT: your very own libjit for nefarious Perl purposes
use strict;
use warnings;
use File::ShareDir ();
use Config ();
use File::Spec;
our $VERSION = '0.03'; # VERSION
sub new {
my $class = shift;
Carp::croak('You must call this as a class method') if ref($class);
my $self = bless {
base_dir => File::Spec->catdir(
File::ShareDir::dist_dir('Alien-LibJIT'),
'libjit'
),
} => $class;
return $self;
}
sub lib_dir {
my $self = shift;
return $self->{lib_dir} if defined $self->{lib_dir};
$self->{lib_dir} = File::Spec->catdir($self->{base_dir}, 'lib');
}
sub static_library {
my $self = shift;
return File::Spec->catfile($self->lib_dir, "libjit" . $Config::Config{lib_ext});
}
sub include_dir {
my $self = shift;
return $self->{include_dir} if defined $self->{include_dir};
$self->{include_dir} = File::Spec->catdir($self->{base_dir}, 'include');
}
1;
__END__
=pod
=head1 NAME
Alien::LibJIT - your very own libjit for nefarious Perl purposes
=head1 VERSION
version 0.03
=head1 SYNOPSIS
use Alien::LibJIT;
my $aroot = Alien::ROOT->new;
=head1 DESCRIPTION
Installs a copy of libjit for use from XS modules.
This version of C<Alien::LibJIT> comes with the libjit
code from L<http://git.savannah.gnu.org/r/libjit.git>
as of 1.9.2013.
=head1 METHODS
=head2 Alien::LibJIT->new
( run in 0.445 second using v1.01-cache-2.11-cpan-d06a3f9ecfd )