Alien-Base-ModuleBuild

 view release on metacpan or  search on metacpan

lib/Alien/Base/ModuleBuild/FAQ.pod  view on Meta::CPAN

120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
   # (Again, if you cannot determine the version,
   #  it is usually sufficent to return a true value)
   return $version;
 }
 
=item set C<alien_provides_cflags> and C<alien_provides_libs> in C<Build.PL>.
 
Add something like this to your C<Build.PL>:
 
 # Build.PL
 use lib 'inc';
 use My::ModuleBuild;
  
 My::ModuleBuild->new(
   ...
   alien_provides_cflags => '-I/usr/include/foo',
   alien_provides_libs   => '-L/usr/lib/foo -lfoo',
   ...
 );
 
Note that it is frequently sufficient to provide C<alien_provides_libs> and the appropriate C<-l> flag.

lib/Alien/Base/ModuleBuild/FAQ.pod  view on Meta::CPAN

375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
=head2 Can/Should I write a tool oriented Alien module using C<Alien::Base> that provides executables instead of a library?
 
Certainly.  The original intent was to provide libraries, but tools are also quite doable using the
C<Alien::Base> tool set.  A simple minded example of this which is fairly easy to replicate is L<Alien::m4>.
 
In general, this means specifying a subclass in your C<Build.PL> and bundling it in your distribution C<inc> directory.
 
C<Build.PL>:
 
 ...
 use lib 'inc';
 use My::ModuleBuild;
  
 My::ModuleBuild->new(
   ...
 )->create_build_script;
 
C<inc/My/ModuleBuild.pm>:
 
 package My::ModuleBuild;

t/alien_base_modulebuild.t  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
use lib 't/lib';
use Test2::V0 -no_srand => 1;
use File::chdir;
use File::Temp ();
use Capture::Tiny qw( capture );
use Path::Tiny qw( path );
 
my $abmb_root = path('.')->absolute;



( run in 0.246 second using v1.01-cache-2.11-cpan-1dc43b0fbd2 )