Re: What to tell Module::Build, and where?
by dragonchild (Archbishop) on Apr 20, 2008 at 14:44 UTC
|
Avoid the whole mess and keep two perl installs. Have the system perl (/usr/bin/perl or /usr/local/bin/perl) which aptitude maintains. Then, have your own personal perl (~/bin/perl) which has your own modules. Check out Perl::Install for an easy way to install it. Patches welcome.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
| [reply] [Watch: Dir/Any] |
|
I agree, though usually keep my own perl in either ~/opt, or else maybe /opt. This way, you can keep all of it under the same tree (which makes an uninstall very easy (i.e. rm -fr ~/opt/perl-5.10.0), if that's ever necessary).
I've never used Perl::Install. I just read the build instructions that come with Perl and go to it.
| [reply] [Watch: Dir/Any] |
|
I would normally agree, but I found myself having to install Perl over and over as part of a deployment process. So, I threw this together as a first-pass CPAN-ization of my scripts.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
| [reply] [Watch: Dir/Any] |
|
Nice idea! I made an extra account with low privileges and tried, but the installation of Perl::Install wants to write to /usr/local/bin and so stopped there. I'll try again with some broader permissions, but I think it should do that operation on something like ~/local/bin?
| [reply] [Watch: Dir/Any] [d/l] [select] |
|
As I said, patches are most welcome. This is the first CPAN distro I made that has installable scripts in it, so I probably screwed up somewhere. The scripts run on their own, so you could just download them from cpan.org and go from there.
My criteria for good software:
- Does it work?
- Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
| [reply] [Watch: Dir/Any] |
Re: What to tell Module::Build, and where?
by oko1 (Deacon) on Apr 20, 2008 at 14:45 UTC
|
I'm running pretty much the same setup as you, and in all the years of using CPAN and 'apt-get', they've never "interfered" with each other. I will admit that I was initially apprehensive about it as well.
With regard to your .modulebuildrc - I don't know if this is sufficient to fix your problem, but that's not how 'install_path' works; it actually takes 2 arguments, the section to install and a location to install that section (e.g., "install_path lib /home/ken/lib/perl5".) Perhaps you meant '--install_base' - which does take a single argument.
--
Human history becomes more and more a race between education and catastrophe. -- HG Wells
| [reply] [Watch: Dir/Any] |
|
in all the years of using CPAN and 'apt-get', they've never "interfered" with each other
Well, there might be something to all those years, and you might be better than me to actually rtfm...
I tried to set .modulebuildrc once with install_path lib /home/kai/perl5lib and once with install_base /home/kai/perl5lib but Module::Build still wasn't impressed.
I've read the perldoc on Module::Build, but it's a litle vague on the actual syntax of the .modulebuildrc, so I've tried all the combinations both with and without leading whitespace, but without any noticeable effect.
| [reply] [Watch: Dir/Any] [d/l] [select] |
Re: What to tell Module::Build, and where?
by sundialsvc4 (Abbot) on Apr 20, 2008 at 17:58 UTC
|
Many folks deal with an analog of this same problem with regard to “shared-hosting plans” for websites. You're running as a non-root guest, in a shared environment along with hundreds or even thousands of other sites, and this environment is being updated from time-to-time (you hope...) by the ISP vendor. Meanwhile, the site-specific environment used by your website must be maintained. In addition, you want to keep mirrors of each site's environment on your own development machine: even when the several sites that you're responsible for are completely different, you want to be able to manage them all with an easy rsync.
You'll find a wealth of existing information here if you search for keywords like “shared hosting” and “PERL5LIB,” and you should do that next. I think it will be much more helpful than anything I could repeat here.
I maintain each website that I maintain, from a separate login account on my own systems. Each one's bash-login script issues the export commands that the site's own Apache configurations will use. (Each site also has a local VirtualHost configuration as blahblah.dev and this is listed in /etc/hosts, but I digress.)
Anyhow, Perl offers a number of ways to configure the library search-order: the hard-coded list in the Perl executable; site-wide configuration files; environment variables, and use lib. All of these prepend entries to the @INC list which is always searched front-to-back. Using any one of these methods or some combination, you can set up very specific environments. As you now see, it's a common thing to do. No, the error-messages are not the greatest, but you're certainly not the first person to be head-whacking about them.
Finally, one other footnote-observation: I don't know if your distro's management software is written in Perl, but that too is a valid consideration. You probably don't want to touch the “global, system-wide” settings. You don't want to install your CPAN-stuff in the global location. All that you want to do is to be sure that when “you” run “your stuff,” always “your library settings” are the ones that Perl will pick up in “your” case.
| [reply] [Watch: Dir/Any] |
|
| [reply] [Watch: Dir/Any] |
Re: What to tell Module::Build, and where?
by FunkyMonk (Chancellor) on Apr 20, 2008 at 22:08 UTC
|
Debian (that Ubuntu is derived from) has a package called dh-make-perl that will download (using CPAN), make, test and build a .deb automatically
Can you get that from apt-get? (If not, can you use the Debian package?)
Disclaimer: I'm a user of Debian, not Ubuntu
| [reply] [Watch: Dir/Any] [d/l] [select] |
|
I've barely noticed it earlier, and I think it just got a few bugfixes in Oslo? I'll look into the docs on that, and come back with a summary. Seems promising!
| [reply] [Watch: Dir/Any] |
Re: What to tell Module::Build, and where?
by wrinkles (Pilgrim) on Apr 20, 2008 at 18:01 UTC
|
./Build install --install_base /path_to_base_directory
| [reply] [Watch: Dir/Any] [d/l] |
|
No. I want to get it to work properly, and not rather infrequently have to look Into::Module to do a ./Build install, or should I?
| [reply] [Watch: Dir/Any] [d/l] [select] |
Re: What to tell Module::Build, and where?
by perrin (Chancellor) on Apr 21, 2008 at 12:21 UTC
|
What version of Module::Build do you have? I think you need to upgrade it to get one that emulates PREFIX. What you're doing now will probably work on what you have if you stop passing PREFIX to it. I'm guessing you have CPAN set to always pass it. | [reply] [Watch: Dir/Any] |
|
| [reply] [Watch: Dir/Any] |
|
A grep of 0.2808 doesn't show the error message you're getting. I think you either don't have 0.2808 or don't have it in the path for the Perl you're running CPAN on.
| [reply] [Watch: Dir/Any] |
|