Perl 5.26 and the . in INC issue where modules won't install

Hi Module Authors,

Increasingly I am having problems with modules in Perl 5.26 and later which won't install because of the . not in @INC issue. Quite often it is not even the module I want to use but a requirement

e.g., Cache::Memory requires File::NFSLock and File::NFSLock won't install on 5.26 because of @INC change.

In the case of File::NFSLock, a patch was submitted back in Feb 2017 (https://rt.cpan.org/Public/Bug/Display.html?id=120088) but it has still not been applied. Other than ask to take over maintainership of File::NFSLock (and a number of other modules with the same problem) what can I do to get this fixed? Is there a way for a non maintainer to apply the patch and release a new version?

The extra reason this is a pain is we are using Carton and so I believe to supply a hand crafted fixed module I'd have to have a web server somewhere, where I could place the patched module.

Thanks

Martin
0
martin
11/1/2018 3:28:07 PM
perl.module-authors 1571 articles. 0 followers. Follow

13 Replies
28 Views

Similar Articles

[PageSpeed] 0

--0000000000001a36fe05799cc098
Content-Type: text/plain; charset="UTF-8"

You can always fork the module but then it requires the other modules to
use that fork instead. Another alternative is Alt:: (
http://metacpan.org/pod/Alt) but that's opt-in for the user and messy, and
may not work out with Carton. Getting the author to pass you maintainership
or adopting the module if the maintainers haven't responded after a few
weeks (after trying listed emails, bug reports) is the simplest way to get
the dist fixed.

-Dan

On Thu, Nov 1, 2018 at 11:37 AM Martin J. Evans <martin.evans@easysoft.com>
wrote:

> Hi Module Authors,
>
> Increasingly I am having problems with modules in Perl 5.26 and later
> which won't install because of the . not in @INC issue. Quite often it is
> not even the module I want to use but a requirement
>
> e.g., Cache::Memory requires File::NFSLock and File::NFSLock won't install
> on 5.26 because of @INC change.
>
> In the case of File::NFSLock, a patch was submitted back in Feb 2017 (
> https://rt.cpan.org/Public/Bug/Display.html?id=120088) but it has still
> not been applied. Other than ask to take over maintainership of
> File::NFSLock (and a number of other modules with the same problem) what
> can I do to get this fixed? Is there a way for a non maintainer to apply
> the patch and release a new version?
>
> The extra reason this is a pain is we are using Carton and so I believe to
> supply a hand crafted fixed module I'd have to have a web server somewhere,
> where I could place the patched module.
>
> Thanks
>
> Martin
>

--0000000000001a36fe05799cc098
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">You can always fork the module but then i=
t requires the other modules to use that fork instead. Another alternative =
is Alt:: (<a href=3D"http://metacpan.org/pod/Alt">http://metacpan.org/pod/A=
lt</a>) but that&#39;s opt-in for the user and messy, and may not work out =
with Carton. Getting the author to pass you maintainership or adopting the =
module if the maintainers haven&#39;t responded after a few weeks (after tr=
ying listed emails, bug reports) is the simplest way to get the dist fixed.=
</div><div dir=3D"ltr"><br></div><div>-Dan</div></div><br><div class=3D"gma=
il_quote"><div dir=3D"ltr">On Thu, Nov 1, 2018 at 11:37 AM Martin J. Evans =
&lt;<a href=3D"mailto:martin.evans@easysoft.com">martin.evans@easysoft.com<=
/a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0=
 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Module Authors,<b=
r>
<br>
Increasingly I am having problems with modules in Perl 5.26 and later which=
 won&#39;t install because of the . not in @INC issue. Quite often it is no=
t even the module I want to use but a requirement<br>
<br>
e.g., Cache::Memory requires File::NFSLock and File::NFSLock won&#39;t inst=
all on 5.26 because of @INC change.<br>
<br>
In the case of File::NFSLock, a patch was submitted back in Feb 2017 (<a hr=
ef=3D"https://rt.cpan.org/Public/Bug/Display.html?id=3D120088" rel=3D"noref=
errer" target=3D"_blank">https://rt.cpan.org/Public/Bug/Display.html?id=3D1=
20088</a>) but it has still not been applied. Other than ask to take over m=
aintainership of File::NFSLock (and a number of other modules with the same=
 problem) what can I do to get this fixed? Is there a way for a non maintai=
ner to apply the patch and release a new version?<br>
<br>
The extra reason this is a pain is we are using Carton and so I believe to =
supply a hand crafted fixed module I&#39;d have to have a web server somewh=
ere, where I could place the patched module.<br>
<br>
Thanks<br>
<br>
Martin<br>
</blockquote></div>

--0000000000001a36fe05799cc098--
0
grinnz
11/1/2018 4:16:56 PM
On Thu, Nov 01, 2018 at 03:28:07PM +0000, Martin J. Evans wrote:

> Increasingly I am having problems with modules in Perl 5.26 and later which 
> won't install because of the . not in @INC issue. Quite often it is not 
> even the module I want to use but a requirement
> 
> e.g., Cache::Memory requires File::NFSLock and File::NFSLock won't install 
> on 5.26 because of @INC change.

Until authors fix their stuff you can set PERL_USE_UNSAFE_INC=1.

-- 
David Cantrell | London Perl Mongers Deputy Chief Heretic

Us Germans take our humour very seriously
  -- German cultural attache talking to the Today Programme,
     about the German supposed lack of a sense of humour, 29 Aug 2001
0
david
11/1/2018 4:18:43 PM
--0000000000003ad83605799cd6f4
Content-Type: text/plain; charset="UTF-8"

You can install these modules again by setting PERL_USE_UNSAFE_INC=1 in
your environment while installing.

You can also install locally patched modules with carton by specifying a
'file:///' path in cpanfile:

    requires 'Foo::Bar', '0.123', url =>
'file:///local/path/Foo-Bar-0.123.tar.gz';

--0000000000003ad83605799cd6f4
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-size:small">You=
 can install these modules again by setting PERL_USE_UNSAFE_INC=3D1 in your=
 environment while installing.</div><div class=3D"gmail_default" style=3D"f=
ont-size:small"><br></div><div class=3D"gmail_default" style=3D"font-size:s=
mall">You can also install locally patched modules with carton by specifyin=
g a &#39;file:///&#39; path in cpanfile:</div><div class=3D"gmail_default" =
style=3D"font-size:small"><br></div><div class=3D"gmail_default" style=3D"f=
ont-size:small">=C2=A0=C2=A0=C2=A0 requires &#39;Foo::Bar&#39;, &#39;0.123&=
#39;, url =3D&gt; &#39;file:///local/path/Foo-Bar-0.123.tar.gz&#39;;<br></d=
iv><div class=3D"gmail_default" style=3D"font-size:small"><br></div><div cl=
ass=3D"gmail_default" style=3D"font-size:small"><br></div></div>

--0000000000003ad83605799cd6f4--
0
perl
11/1/2018 4:23:19 PM
--------------54F127AC7ECAFF528D4BC045
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit

On 01/11/2018 16:23, Karen Etheridge wrote:
> You can install these modules again by setting PERL_USE_UNSAFE_INC=1 in your environment while installing.
>
Yes, thanks. However, I did not name all of my problems and only one of them was @INC issue. The other problem is modules which won't build for other reasons that need patches not applied e.g. WWW::Curl.

> You can also install locally patched modules with carton by specifying a 'file:///' path in cpanfile:
>
>     requires 'Foo::Bar', '0.123', url => 'file:///local/path/Foo-Bar-0.123.tar.gz';
>
This is will do nicely for all my issues. Thank you. I was only aware of dist/url.

Martin



--------------54F127AC7ECAFF528D4BC045
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 01/11/2018 16:23, Karen Etheridge
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAPJsHfBG41GjdPoQ_-jzYMaaE0bnU9mkSvshsZ=TmxJ--2_MUA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div class="gmail_default" style="font-size:small">You can
          install these modules again by setting PERL_USE_UNSAFE_INC=1
          in your environment while installing.</div>
        <div class="gmail_default" style="font-size:small"><br>
        </div>
      </div>
    </blockquote>
    <p>Yes, thanks. However, I did not name all of my problems and only
      one of them was @INC issue. The other problem is modules which
      won't build for other reasons that need patches not applied e.g.
      WWW::Curl.<br>
    </p>
    <blockquote type="cite"
cite="mid:CAPJsHfBG41GjdPoQ_-jzYMaaE0bnU9mkSvshsZ=TmxJ--2_MUA@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_default" style="font-size:small">You can also
          install locally patched modules with carton by specifying a
          '<a class="moz-txt-link-freetext" href="file:///">file:///</a>' path in cpanfile:</div>
        <div class="gmail_default" style="font-size:small"><br>
        </div>
        <div class="gmail_default" style="font-size:small">    requires
          'Foo::Bar', '0.123', url =&gt;
          '<a class="moz-txt-link-freetext" href="file:///local/path/Foo-Bar-0.123.tar.gz">file:///local/path/Foo-Bar-0.123.tar.gz</a>';<br>
        </div>
        <div class="gmail_default" style="font-size:small"><br>
        </div>
      </div>
    </blockquote>
    <p>This is will do nicely for all my issues. Thank you. I was only
      aware of dist/url.</p>
    <p>Martin<br>
    </p>
    <p><br>
    </p>
  </body>
</html>

--------------54F127AC7ECAFF528D4BC045--
0
martin
11/1/2018 4:52:47 PM
--000000000000d14e1705799da32f
Content-Type: text/plain; charset="UTF-8"

One of the (few?) benefits of using cpan over cpanm is that you can use the
distroprefs [1] functionality to automatically apply local patches when
installing from CPAN.  Mixing cpan and cpanm makes for an awkward workflow,
but I don't know of a cpanm equivalent.


[1]
http://perldoc.perl.org/CPAN.html#Configuration-for-individual-distributions-(_Distroprefs_)

On Thu, Nov 1, 2018 at 12:53 PM Martin J. Evans <martin.evans@easysoft.com>
wrote:

> On 01/11/2018 16:23, Karen Etheridge wrote:
>
> You can install these modules again by setting PERL_USE_UNSAFE_INC=1 in
> your environment while installing.
>
> Yes, thanks. However, I did not name all of my problems and only one of
> them was @INC issue. The other problem is modules which won't build for
> other reasons that need patches not applied e.g. WWW::Curl.
>
> You can also install locally patched modules with carton by specifying a '
> file:///' path in cpanfile:
>
>     requires 'Foo::Bar', '0.123', url => '
> file:///local/path/Foo-Bar-0.123.tar.gz';
>
> This is will do nicely for all my issues. Thank you. I was only aware of
> dist/url.
>
> Martin
>
>
>

--000000000000d14e1705799da32f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div>One of the (few?) benefits of using =
cpan over cpanm is that you can use the distroprefs [1] functionality to au=
tomatically apply local patches when installing from CPAN.=C2=A0 Mixing cpa=
n and cpanm makes for an awkward workflow, but I don&#39;t know of a cpanm =
equivalent.<br></div><div><br></div><div><br></div><div>[1] <a href=3D"http=
://perldoc.perl.org/CPAN.html#Configuration-for-individual-distributions-(_=
Distroprefs_)">http://perldoc.perl.org/CPAN.html#Configuration-for-individu=
al-distributions-(_Distroprefs_)</a><br></div></div></div><br><div class=3D=
"gmail_quote"><div dir=3D"ltr">On Thu, Nov 1, 2018 at 12:53 PM Martin J. Ev=
ans &lt;<a href=3D"mailto:martin.evans@easysoft.com">martin.evans@easysoft.=
com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 =20
   =20
 =20
  <div text=3D"#000000" bgcolor=3D"#FFFFFF">
    <div class=3D"m_-2374977386261758465moz-cite-prefix">On 01/11/2018 16:2=
3, Karen Etheridge
      wrote:<br>
    </div>
    <blockquote type=3D"cite">
     =20
      <div dir=3D"ltr">
        <div class=3D"gmail_default" style=3D"font-size:small">You can
          install these modules again by setting PERL_USE_UNSAFE_INC=3D1
          in your environment while installing.</div>
        <div class=3D"gmail_default" style=3D"font-size:small"><br>
        </div>
      </div>
    </blockquote>
    <p>Yes, thanks. However, I did not name all of my problems and only
      one of them was @INC issue. The other problem is modules which
      won&#39;t build for other reasons that need patches not applied e.g.
      WWW::Curl.<br>
    </p>
    <blockquote type=3D"cite">
      <div dir=3D"ltr">
        <div class=3D"gmail_default" style=3D"font-size:small">You can also
          install locally patched modules with carton by specifying a
          &#39;<a class=3D"m_-2374977386261758465moz-txt-link-freetext">fil=
e:///</a>&#39; path in cpanfile:</div>
        <div class=3D"gmail_default" style=3D"font-size:small"><br>
        </div>
        <div class=3D"gmail_default" style=3D"font-size:small">=C2=A0=C2=A0=
=C2=A0 requires
          &#39;Foo::Bar&#39;, &#39;0.123&#39;, url =3D&gt;
          &#39;<a class=3D"m_-2374977386261758465moz-txt-link-freetext">fil=
e:///local/path/Foo-Bar-0.123.tar.gz</a>&#39;;<br>
        </div>
        <div class=3D"gmail_default" style=3D"font-size:small"><br>
        </div>
      </div>
    </blockquote>
    <p>This is will do nicely for all my issues. Thank you. I was only
      aware of dist/url.</p>
    <p>Martin<br>
    </p>
    <p><br>
    </p>
  </div>

</blockquote></div>

--000000000000d14e1705799da32f--
0
djerius
11/1/2018 5:20:12 PM
On Thu, 1 Nov 2018 15:28:07 +0000
"Martin J. Evans" <martin.evans@easysoft.com> wrote:

> Increasingly I am having problems with modules in Perl 5.26 and later
> which won't install because of the . not in @INC issue. Quite often
> it is not even the module I want to use but a requirement

You should never use the current directory. If the module is located in
the same directory as the script, `use FindBin`
https://perldoc.perl.org/FindBin.html


use FindBin qw( $Bin );
use lib $Bin;
# the script's modules go here

Or:

use FindBin qw( $RealBin );
use lib $RealBin;
# the script's modules go here


FindBin is a standard module. For a list of standard modules, see
`perldoc perlmodlib` https://perldoc.perl.org/perlmodlib.html


-- 
Don't stop where the ink does.

	Shawn H Corey
0
shawnhcorey
11/1/2018 6:41:21 PM
--ylrqf275rj4zaqlz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Karen,

> You can also install locally patched modules with carton by
> specifying a 'file:///' path in cpanfile:
>=20
>     requires 'Foo::Bar', '0.123', url =3D>
> 'file:///local/path/Foo-Bar-0.123.tar.gz';

I tried this with latest Carton (v1.0.28) and it didn't work.
Since I couldn't find any reference to an url attribute in
Module::CPANfile, I'm wondering whether I'm missing something
because this looks like a very nice feature.

Can you provide some details or pointers on how it works?

Thanks!
Alex


--ylrqf275rj4zaqlz
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEaUBwKsbetWW2SKTt466XjoNOXn4FAlvbjpsACgkQ466XjoNO
Xn5nDRAAybVBXAM+EwIGOrl79p2XyzCSaGOJr/33huAXV9/nIqTWlTZGX9ojvCRr
qlxG3kqAIZUgvYT62blpfb2CoqTUmAHAfusGfkFHDLqqyIGbNrXTKUJl71f1N97u
5lzisoQM+DqM2lA2H645ZPu6w6SRUAdm4i95GVTN0FMweqMiK42nAiKvGRbZH6r8
/MkG/26zbqyQ0yP/MtyYvPaM0j38j7HtucM9MbOhDF8ndnVMBVZ25bzCSwQXlvIH
gT7uo459bSn6pUxOAnxF3bMGAWEj7ohcskktJ2PatHdCWaY01lditZhQUwaXZgJZ
GECVk9lcs/xbBpdDUKu4To6zMKLbRE4sljj5EjjCReqsM0Kqvl5q2SQhEhGO9PDW
mF8QtZPkddaEZtAewqLB5LBuAHLfFKPfAfj+cLS03Ga01CTcsu1gPEGFRku72+ar
ixWg36VV74QxBiP91iJ8ZPHtBnKSriCJOdxIEgUrrU8rmUmKqqsITBk+RS2FgQ+k
ar8fm+CEQFbb2FyXo1e1I6bqPa0gWB+3bC2xjoyB4JcCvlWPwb8XbFQWmW6DEs9+
FF2zQG6lfyJ+G1Xl49tNkrQM/aGYVC6OxU3KwpCmqSM3jcPnvTLAFIRsVPAyIXkB
IjE5Y9n6u3LqPui0BgLwklcmekalRs796B7ykslb/z1Epzy4C08=
=XZR7
-----END PGP SIGNATURE-----

--ylrqf275rj4zaqlz--
0
alexm
11/1/2018 11:39:14 PM
--000000000000fe21800579a3ee69
Content-Type: text/plain; charset="UTF-8"

The 'dist' option is documented in Module::CPANfile, but the 'url' option
can only be found in the t/options.t test in the distribution -- so it must
be implemented at least partially, somehow.  Maybe miyagawa can comment?

On Thu, Nov 1, 2018 at 4:39 PM, Alex Muntada <alexm@cpan.org> wrote:

> Hi Karen,
>
> > You can also install locally patched modules with carton by
> > specifying a 'file:///' path in cpanfile:
> >
> >     requires 'Foo::Bar', '0.123', url =>
> > 'file:///local/path/Foo-Bar-0.123.tar.gz';
>
> I tried this with latest Carton (v1.0.28) and it didn't work.
> Since I couldn't find any reference to an url attribute in
> Module::CPANfile, I'm wondering whether I'm missing something
> because this looks like a very nice feature.
>
> Can you provide some details or pointers on how it works?
>
> Thanks!
> Alex
>
>

--000000000000fe21800579a3ee69
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-size:small">The=
 &#39;dist&#39; option is documented in Module::CPANfile, but the &#39;url&=
#39; option can only be found in the t/options.t test in the distribution -=
- so it must be implemented at least partially, somehow.=C2=A0 Maybe miyaga=
wa can comment?<br></div></div><div class=3D"gmail_extra"><br><div class=3D=
"gmail_quote">On Thu, Nov 1, 2018 at 4:39 PM, Alex Muntada <span dir=3D"ltr=
">&lt;<a href=3D"mailto:alexm@cpan.org" target=3D"_blank">alexm@cpan.org</a=
>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 =
0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Karen,<br>
<span class=3D""><br>
&gt; You can also install locally patched modules with carton by<br>
&gt; specifying a &#39;file:///&#39; path in cpanfile:<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0requires &#39;Foo::Bar&#39;, &#39;0.123&#39;, url =
=3D&gt;<br>
&gt; &#39;file:///local/path/Foo-Bar-0.<wbr>123.tar.gz&#39;;<br>
<br>
</span>I tried this with latest Carton (v1.0.28) and it didn&#39;t work.<br=
>
Since I couldn&#39;t find any reference to an url attribute in<br>
Module::CPANfile, I&#39;m wondering whether I&#39;m missing something<br>
because this looks like a very nice feature.<br>
<br>
Can you provide some details or pointers on how it works?<br>
<br>
Thanks!<br>
<span class=3D"HOEnZb"><font color=3D"#888888">Alex<br>
<br>
</font></span></blockquote></div><br></div>

--000000000000fe21800579a3ee69--
0
perl
11/2/2018 12:51:19 AM
--00000000000038c9a80579a7c0db
Content-Type: text/plain; charset="UTF-8"

See https://github.com/miyagawa/cpanminus/pull/579 for my attempt at
documenting this behavior. Carton 1.0.34 is the latest version.

-Dan

On Thu, Nov 1, 2018 at 8:51 PM Karen Etheridge <perl@froods.org> wrote:

> The 'dist' option is documented in Module::CPANfile, but the 'url' option
> can only be found in the t/options.t test in the distribution -- so it must
> be implemented at least partially, somehow.  Maybe miyagawa can comment?
>
> On Thu, Nov 1, 2018 at 4:39 PM, Alex Muntada <alexm@cpan.org> wrote:
>
>> Hi Karen,
>>
>> > You can also install locally patched modules with carton by
>> > specifying a 'file:///' path in cpanfile:
>> >
>> >     requires 'Foo::Bar', '0.123', url =>
>> > 'file:///local/path/Foo-Bar-0.123.tar.gz';
>>
>> I tried this with latest Carton (v1.0.28) and it didn't work.
>> Since I couldn't find any reference to an url attribute in
>> Module::CPANfile, I'm wondering whether I'm missing something
>> because this looks like a very nice feature.
>>
>> Can you provide some details or pointers on how it works?
>>
>> Thanks!
>> Alex
>>
>>
>

--00000000000038c9a80579a7c0db
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr">See=C2=A0<a href=3D"http=
s://github.com/miyagawa/cpanminus/pull/579">https://github.com/miyagawa/cpa=
nminus/pull/579</a> for my attempt at documenting this behavior. Carton 1.0=
..34 is the latest version.</div><div dir=3D"ltr"><br></div><div>-Dan</div><=
/div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Thu, Nov 1, 2=
018 at 8:51 PM Karen Etheridge &lt;<a href=3D"mailto:perl@froods.org">perl@=
froods.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=
=3D"ltr"><div class=3D"gmail_default" style=3D"font-size:small">The &#39;di=
st&#39; option is documented in Module::CPANfile, but the &#39;url&#39; opt=
ion can only be found in the t/options.t test in the distribution -- so it =
must be implemented at least partially, somehow.=C2=A0 Maybe miyagawa can c=
omment?<br></div></div><div class=3D"gmail_extra"><br><div class=3D"gmail_q=
uote">On Thu, Nov 1, 2018 at 4:39 PM, Alex Muntada <span dir=3D"ltr">&lt;<a=
 href=3D"mailto:alexm@cpan.org" target=3D"_blank">alexm@cpan.org</a>&gt;</s=
pan> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex=
;border-left:1px #ccc solid;padding-left:1ex">Hi Karen,<br>
<span><br>
&gt; You can also install locally patched modules with carton by<br>
&gt; specifying a &#39;file:///&#39; path in cpanfile:<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0requires &#39;Foo::Bar&#39;, &#39;0.123&#39;, url =
=3D&gt;<br>
&gt; &#39;file:///local/path/Foo-Bar-0.123.tar.gz&#39;;<br>
<br>
</span>I tried this with latest Carton (v1.0.28) and it didn&#39;t work.<br=
>
Since I couldn&#39;t find any reference to an url attribute in<br>
Module::CPANfile, I&#39;m wondering whether I&#39;m missing something<br>
because this looks like a very nice feature.<br>
<br>
Can you provide some details or pointers on how it works?<br>
<br>
Thanks!<br>
<span class=3D"m_-138384662595803195HOEnZb"><font color=3D"#888888">Alex<br=
>
<br>
</font></span></blockquote></div><br></div>
</blockquote></div>

--00000000000038c9a80579a7c0db--
0
grinnz
11/2/2018 5:24:17 AM
On 01/11/2018 23:39, Alex Muntada wrote:
> Hi Karen,
>
>> You can also install locally patched modules with carton by
>> specifying a 'file:///' path in cpanfile:
>>
>>      requires 'Foo::Bar', '0.123', url =>
>> 'file:///local/path/Foo-Bar-0.123.tar.gz';
> I tried this with latest Carton (v1.0.28) and it didn't work.
> Since I couldn't find any reference to an url attribute in
> Module::CPANfile, I'm wondering whether I'm missing something
> because this looks like a very nice feature.
>
> Can you provide some details or pointers on how it works?
>
> Thanks!
> Alex
>
Yes, me too. Shame as it was just the solution I was looking for:

$ ls /home/martin/Downloads/ZMQ-FFI-1.11.tar.gz
/home/martin/Downloads/ZMQ-FFI-1.11.tar.gz

$ cat cpanfile

requires 'ZMQ::FFI', 'file:///home/martin/Downloads/ZMQ-FFI-1.11.tar.gz';

$ carton install
Installing modules using /home/martin/xxx/cpanfile
Can't convert 'file:///home/martin/Downloads/ZMQ-FFI-1.11.tar.gz': Invalid version format (non-numeric data)
Installing modules failed

Martin
0
martin
11/2/2018 8:51:44 AM
--cfs65xrln7uatfyc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi Dan,

> See https://github.com/miyagawa/cpanminus/pull/579 for my
> attempt at documenting this behavior. Carton 1.0.34 is the
> latest version.

You're right. I had a broken carton setup where Carton.pm was
loaded from system package instead of the latest CPAN release
that I had installed manually.

I just tested with 1.0.34 and the url param works like charm :)

Thanks a lot!
Alex


--cfs65xrln7uatfyc
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEaUBwKsbetWW2SKTt466XjoNOXn4FAlvcLGoACgkQ466XjoNO
Xn4McA//VLziqGM6z0I5Y+cIqDI0LZB718+BNCP/8fVoIYD6Kl9pHibD0fdr/ZBH
i5294s8GnMU4B7K+PTb9p9yL0c5+2nhiO8BpNKd5Sanqv+tEipZDmai18Uaygs/c
HoWtrl/yvrhe8sxePzjKDwtYDi37P+5hGn9zI9kRqBY4JOSNPt+xn6Q7PZHykFpP
+cDaLqhFVQJa/2il0Yyfw5VRRgaAQAKAiRaIfeEcmrzTHyEqXM2fkum7m2jSQ4nu
3OiQyr/cLu//kPP/ilgDl+0sXvL7ahlCWaofqDkttA2N2JZaOGLTZnnHsM9jc8r8
DUWjHh0zI/3PLMuzQu3vAgvlI+URQOwx2v1XtLcMuzFOq+2HQN+RGSsUIaHIuCmT
Y+3FFwqgI04UYYyCi1ooTwuw6Fb9OMwpVkP2mAJLUkwV/aAblpkdD/05sb6S1qy3
ppH34k6q7GBzt/ss5guQ1Q6S50INjYOsA8mWQbxv38iTk/B41cLuIOl03M6MPbZg
+XOwLj8LduZaAfTUtsenWHHKkHPmDAPMZixmsfq98w3RCvVI+1iGsWWn5cz+kyvB
ydgVXnWzGj+OcMPHZKRyj1gDSeLU/c6631BRgmkESv4SoL6rJWU1zW69ozNYh6il
xkzA+OcGjvRIXzdI36CTU9fbUlWTQB6ADqAX2dxzRqzNUqowL9Y=
=m8SA
-----END PGP SIGNATURE-----

--cfs65xrln7uatfyc--
0
alexm
11/2/2018 10:52:26 AM
--3yepmbxbpmp65juv
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Martin,

> $ cat cpanfile
>=20
> requires 'ZMQ::FFI', 'file:///home/martin/Downloads/ZMQ-FFI-1.11.tar.gz';

Try this:

requires 'ZMQ::FFI', 0, url =3D> 'file:///home/martin/Downloads/ZMQ-FFI-1.1=
1.tar.gz';

Cheers,
Alex


--3yepmbxbpmp65juv
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEaUBwKsbetWW2SKTt466XjoNOXn4FAlvcLLoACgkQ466XjoNO
Xn7d1RAArWgMC9sgzvYMOrWXEAUZsnnb+Txhf0dUxE+Nd6m+xoQ73ewS5XfRlfLc
uY9yJxkkKlH4co012eZgzhUgkdNkWUHQJ9L0pYl7vzICHLiBJgPipRB4IodCrayx
qekhhvYSHXOGKokoIhfyL/GKuGcuvHsYpxOqIAk/VVrzsSp6bBUVBLDjgMbocJ2H
c7X/+A9/zcj2xr1MrvsrShF+OIBNk9h031K1or0nJmFh0v60B//ZOyp1J2/3RkQZ
eDAox5h/SI0UOCsy4UJESPE+ri3dwFPYlkKvO4Ilx1HfZSi5CZBkpq7hHydsUz9P
7ohGRyiUZLBaU6IOO92MXuHO+0CBjcaP+FvoH2p3XTXBpPma5poqqWCFU32nmRSQ
xdDu5weIkZ9gNtaax/yEbBxilfUm/bYUchxAaKIYrIAnleSH/PWm2Zshyuw6AJWL
Hzr67qZ+V/fGTz5oBrWqsAhxOBvNWTyu3H1My04U6GvvBMZsT1AJccL4/eLrs7tV
t9IOu2QzfgfivmNGRg1Ks3ZpUg40D4O95VgZaT8LhzIEONOy4jKqM5I1G6dQtx5w
2AszQ2xIwmDz4oSQjPrcIQscTirozuWK1GSNE4jCscEKo0FGbbFA8TPD/zMnJuNG
bbUIyHEXC7k94wQcw2XexgbKt00CbYRSggvGD61Kc5OIVlTGWJQ=
=UF4O
-----END PGP SIGNATURE-----

--3yepmbxbpmp65juv--
0
alexm
11/2/2018 10:53:46 AM
On 02/11/2018 10:53, Alex Muntada wrote:
> Hi Martin,
>
>> $ cat cpanfile
>>
>> requires 'ZMQ::FFI', 'file:///home/martin/Downloads/ZMQ-FFI-1.11.tar.gz';
> Try this:
>
> requires 'ZMQ::FFI', 0, url => 'file:///home/martin/Downloads/ZMQ-FFI-1.11.tar.gz';
>
> Cheers,
> Alex
>
Thank you Alex. That works a treat.
0
martin
11/2/2018 11:13:42 AM
Reply: