Alien-patchelf

 view release on metacpan or  search on metacpan

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

=head1 NAME

Alien::patchelf - Alien module for the patchelf utility 


=head1 SYNOPSIS

    use Alien::patchelf;
    
    my $pe = Alien::patchelf->new;
    my ($stdout, $stderr, @errors)
      = $pe->patchelf('--print-rpath', '/path/to/some/library.so');

    
=head1 DESCRIPTION

Sometimes you need to change the rpath of binary files,
for example for aliens that are installed in non-standard locations.  
The patchelf utility is used for this purpose.

This is not useful on Windows since dynamic libs are loaded from the PATH.

t/01-run.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;
use Test::Alien;
use Alien::patchelf;

UTILITY:
{
    diag 'Testing Alien::patchelf version: ' . Alien::patchelf->version;
    my ($result, $stderr, $exit) = Alien::patchelf->patchelf ("--help");
    like ($stderr, qr{^syntax\:\s.*patchelf},
        'Got expected first line from patchelf utility');
    diag '';
    diag ("\nUtility results:\n" . $result);
    diag ($stderr) if $stderr;
    diag "Exit code is $exit";
    diag '';
}

done_testing();



( run in 1.109 second using v1.01-cache-2.11-cpan-49f99fa48dc )