in reply to Re: CPANPLUS broken custom sources
in thread CPANPLUS broken custom sources
OK, your certainty was enough to make me go back and reduce things to figure this out. Since I'm new to cpanp, that was helpful. Because it seemed like the cleanest and best approach, I focused on cpanp "custom sources". Here's what I think I can say with some certainty (test follows):
Here's a demo of perl version objects:
$ perl -e 'use version; $v1 = new version("v0.10"); $v2 = new version("v0.9"); print $v1 > $v2, "\n"'
1
Note it printed 1, so v0.10 > v0.9, which is not lexicographical, but the version object order (so we don't have to pad to v0.09 for example).
Next here's a demo showing that while it does install the latest module (provided you follow version lexicographical order), it will not find your prerequisite in custom sources. Note that I tried about 10 different slight permutation on the "requires" string in Build.PL, as described int the docs, from ultra simple, to prepending "v", etc. I couldn't get anything to work (i.e. cpanp never found any of these types). So I'm guessing that it doesn't even look (but I'm new to cpanp so take it with a grain of salt).
# Make empty custom sources dir
$ mkdir customsrc
# Make dummy module
$ module-starter --module=My::Module::Test --author="Jane Smith" --email=jane.smith@example.com --builder=Module::Install
$ module-starter --module=My::Other::Module::Test --author="Jane Smith" --email=jane.smith@example.com --builder=Module::Install
$ cd My-Module-Test
# Add version to generated lib/My/Module/Test.pm => "use version; our $VERSION = qv ('0.1');"
# Add "requires line" to Build.PL => "requires { 'My-Other-Module' => 'v0.1' },"
# Note, I tried many permutations of this, as well as
# changing the version spec in My-Other-Module.
# None of these 10 or so tries worked.
$ perl Build.PL
$ sudo Build dist
$ cp My-Module-Test-v0.1.tar.gz ../customsrc
$ sudo cpanp
\CPANPLUS::Shell::Default -- CPAN exploration and module installation (v0.84)
...
CPAN_Terminal> /cs --add file:////<path-to-your-local-dir>/customsrc
Added remote source 'file:///Applications/MAMP/svn/qws-perl-libs/customsrc'
Remote source contains:
My-Module-Test-v0.1.tar.gz
CPAN_Terminal> install My-Module-Test
# installs OK, but doesn't find My-Other-Module
...Warning: prerequisite My-Other-Module v0.1 not found.
I feel like the custom sources is very close to what I need, and seems a bit less flaky then I previously thought (well, now I am closer to knowing what the real bugs/problems are).
I still need to figure out how to make it look for the custom source prerequisites.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: CPANPLUS broken custom sources
by zerohero (Monk) on Mar 02, 2009 at 03:39 UTC | |
by ikegami (Patriarch) on Mar 03, 2009 at 05:50 UTC | |
by zerohero (Monk) on Mar 02, 2009 at 22:59 UTC |