logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: [Module::Build] Getting started help: msg#00071

Subject: Re: [Module::Build] Getting started help
Thanks so much, that all worked perfectly.  
But I have a followup question, is there a way to actually install this
with the CPAN shell from my tar.gz?

-- fotios

-----Original Message-----
From: module-build-general-bounces@xxxxxxxxxxxxxxxxxxxxx
[mailto:module-build-general-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf
Of Steffen Schwigon
Sent: Wednesday, June 21, 2006 3:09 AM
To: module-build-general@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [Module::Build] Getting started help

"Lindiakos, Fotios" <flindiakos@xxxxxxxxx> writes:
> First, is there a way for me to put something like hc.conf into /etc
> (assuming I have permission to write there.  Where would I have to
> put the file in the package (under lib, or can I have an etc folder
> or something too)?

I would create a subdir 'etc', put hc.conf into that directory and add
the following config to Build.PL:

    my $build = Module::Build->new (
            #
            # ... all stuff you already have
            #
   
            etc_files     => { 'etc/hc.conf' => 'etc/hc.conf' },
            install_path  => { 'etc' => '/etc' }
    );
    $build->add_build_element('etc');
    $build->create_build_script;
    $build->create_makefile_pl;


But I don't know how to make that absolute path '/etc' to work with a
given '--prefix=/somewhere' option. Maybe there's a better way.


> Second, how can I have CPAN automatically build missing dependencies,
> or query for them or something.

That should already work automatically because you specified them with
'requires => {...}'. The CPAN shell will install missing prerequisites
if you configured it to "follow automatically" or "ask".


> On that note (not M::B specific), is there a way that I can test
> using CPAN to install my modules?

I always do manually what the CPAN shell does, e.g. this way:

    # from your project dir
    ./Build dist
    cp My-Dist-0.1.tar.gz /tmp/
  
    # now everything in /tmp dir
    cd /tmp
    tar xzf My-Dist-0.1.tar.gz
    cd My-Dist-0.1
    perl Build.PL
    ./Build
    ./Build test
    ./Build fakeinstall      # or install
  

GreetinX
Steffen 
-- 
Steffen Schwigon <schwigon@xxxxxxxx>
Dresden Perl Mongers <http://dresden-pm.org/>


_______________________________________________
Module-build-general mailing list
Module-build-general@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/module-build-general

All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642


<Prev in Thread] Current Thread [Next in Thread>