Skip Menu |

This queue is for tickets about the Devel-CheckLib CPAN distribution.

Report information
The Basics
Id: 107109
Status: open
Priority: 0/
Queue: Devel-CheckLib

People
Owner: Nobody in particular
Requestors: NWELLNHOF [...] cpan.org
Cc: ether [...] cpan.org
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Use LIBS and INC from PERL_MM_OPT
When developing with Dist::Zilla, it's not possible to pass LIBS and INC as command line arguments to ExtUtils::MakeMaker, so you have to resort to the PERL_MM_OPT environment variable. It would be nice if Devel::CheckLib supported that variable, too.
On 2015-09-15 09:54:11, NWELLNHOF wrote: Show quoted text
> When developing with Dist::Zilla, it's not possible to pass LIBS and > INC as command line arguments to ExtUtils::MakeMaker, so you have to > resort to the PERL_MM_OPT environment variable. It would be nice if > Devel::CheckLib supported that variable, too.
This came up on this ticket: https://github.com/rjbs/Dist-Zilla/issues/413
fixed in 1.04
On Wed Sep 16 06:11:07 2015, mattn wrote: Show quoted text
> fixed in 1.04
+ foreach my $arg (split(' ', $ENV{PERL_MM_OPT}||'')) { + push @incpaths, substr($arg, 2) + if $arg =~ /^-I/; + push @{$arg =~ /^-l/ ? \@libs : \@libpaths}, substr($arg, 2) + if($arg =~ /^-[lLR]/); + } This doesn't look right to me. Here's an example of how PERL_MM_OPT is used: export PERL_MM_OPT='INC=-I/home/nik/install/include LIBS="-L/home/nik/install/lib -lcmark"' It's basically a space-separated list of shell var assignments. Note that the variable values can contain spaces in shell-style double-quoted strings. It's possible that other escape mechanisms may be used as well. Have a look at the ExtUtils::MakeMaker, especially the _shellwords function.
On 2015-9月-16 水 06:45:31, NWELLNHOF wrote: Show quoted text
> On Wed Sep 16 06:11:07 2015, mattn wrote:
> > fixed in 1.04
> > + foreach my $arg (split(' ', $ENV{PERL_MM_OPT}||'')) { > + push @incpaths, substr($arg, 2) > + if $arg =~ /^-I/; > + push @{$arg =~ /^-l/ ? \@libs : \@libpaths}, substr($arg, 2) > + if($arg =~ /^-[lLR]/); > + } > > This doesn't look right to me. Here's an example of how PERL_MM_OPT is > used: > > export PERL_MM_OPT='INC=-I/home/nik/install/include LIBS="- > L/home/nik/install/lib -lcmark"' > > It's basically a space-separated list of shell var assignments. Note > that the variable values can contain spaces in shell-style double- > quoted strings. It's possible that other escape mechanisms may be used > as well. Have a look at the ExtUtils::MakeMaker, especially the > _shellwords function.
Ah, I didn't know PERL_MM_OPT is that. Will fix.
On 2015-9月-16 水 06:57:48, mattn wrote: Show quoted text
> On 2015-9月-16 水 06:45:31, NWELLNHOF wrote:
> > On Wed Sep 16 06:11:07 2015, mattn wrote:
> > > fixed in 1.04
> > > > + foreach my $arg (split(' ', $ENV{PERL_MM_OPT}||'')) { > > + push @incpaths, substr($arg, 2) > > + if $arg =~ /^-I/; > > + push @{$arg =~ /^-l/ ? \@libs : \@libpaths}, substr($arg, 2) > > + if($arg =~ /^-[lLR]/); > > + } > > > > This doesn't look right to me. Here's an example of how PERL_MM_OPT is > > used: > > > > export PERL_MM_OPT='INC=-I/home/nik/install/include LIBS="- > > L/home/nik/install/lib -lcmark"' > > > > It's basically a space-separated list of shell var assignments. Note > > that the variable values can contain spaces in shell-style double- > > quoted strings. It's possible that other escape mechanisms may be used > > as well. Have a look at the ExtUtils::MakeMaker, especially the > > _shellwords function.
> > > Ah, I didn't know PERL_MM_OPT is that. Will fix.
fixed in 1.05.