Net::IDN::Encode Build procedure in external dir.?

Discussion in 'Perl Misc' started by Tuxedo, Nov 11, 2012.

  1. Tuxedo

    Tuxedo Guest

    The Net::IDN::Encode module converts IDN domains into ASCII and vice versa:
    http://search.cpan.org/~cfaerber/Net-IDN-Encode-2.003/lib/Net/IDN/Encode.pm

    The documented build procedure is:
    perl Build.PL
    ../Build
    ../Build test
    ../Build install

    However, I'm not sure how to install this particular module in an non-root
    owned directory, if at all possible. My installation procedure for modules
    on typical Unix and Linux systems usually include a PREFIX argument, as in:
    perl Makefile.PL PREFIX=/some/external/directory

    As noted in Net::IDN::Encode's README at
    http://cpansearch.perl.org/src/CFAERBER/Net-IDN-Encode-2.003/README the
    module depends on Unicode::Stringprep, which has the same build procedure:
    http://search.cpan.org/dist/Unicode-Stringprep/

    Without quite expecting it to work, I tried: ...
    perl Build.PL PREFIX=/some/external/directory
    .... but PREFIX is obviously unrecognised here, so for both modules the
    installation failed at the last 'Build install' step with an expected
    permission error:
    ERROR: Can't create '/usr/lib/perl5/site_perl/5.14.2/Unicode'
    mkdir /usr/lib/perl5/site_perl/5.14.2/Unicode: Permission denied at
    /usr/lib/perl5/5.14.2/ExtUtils/Install.pm line 494

    While I can usually install as root that is not always the case, so I
    prefer to place most non-core modules in non-root directories.

    Can anyone advise me how this module and other modules that may use similar
    build procedures may be installed in a non-root directory?

    Many thanks for any advise.

    Tuxedo
     
    Tuxedo, Nov 11, 2012
    #1
    1. Advertising

  2. Tuxedo

    Tuxedo Guest

    Ben Morrow wrote:

    >
    > Quoth Tuxedo <>:
    > > The Net::IDN::Encode module converts IDN domains into ASCII and vice
    > > versa:
    > >

    http://search.cpan.org/~cfaerber/Net-IDN-Encode-2.003/lib/Net/IDN/Encode.pm
    > >
    > > The documented build procedure is:
    > > perl Build.PL
    > > ./Build
    > > ./Build test
    > > ./Build install
    > >
    > > However, I'm not sure how to install this particular module in an
    > > non-root owned directory, if at all possible. My installation procedure
    > > for modules on typical Unix and Linux systems usually include a PREFIX
    > > argument, as in: perl Makefile.PL PREFIX=/some/external/directory
    > >
    > > As noted in Net::IDN::Encode's README at
    > > http://cpansearch.perl.org/src/CFAERBER/Net-IDN-Encode-2.003/README the
    > > module depends on Unicode::Stringprep, which has the same build
    > > procedure: http://search.cpan.org/dist/Unicode-Stringprep/
    > >
    > > Without quite expecting it to work, I tried: ...
    > > perl Build.PL PREFIX=/some/external/directory
    > > ... but PREFIX is obviously unrecognised here, so for both modules the
    > > installation failed at the last 'Build install' step with an expected
    > > permission error:
    > > ERROR: Can't create '/usr/lib/perl5/site_perl/5.14.2/Unicode'
    > > mkdir /usr/lib/perl5/site_perl/5.14.2/Unicode: Permission denied at
    > > /usr/lib/perl5/5.14.2/ExtUtils/Install.pm line 494
    > >
    > > While I can usually install as root that is not always the case, so I
    > > prefer to place most non-core modules in non-root directories.

    >
    > For Build.PL the argument is '--install_base /some/dir'; see the
    > Module::Build documentation. Note that this won't always install things
    > in quite the same place as MakeMaker's PREFIX parameter, since PREFIX is
    > a little weird; in fact, MakeMaker's documentation currently recommends
    > using INSTALL_BASE instead of PREFIX, which matches Module::Build's
    > --install_base and is more predictable than PREFIX.
    >
    > If you are maintaining a repository of modules under your home
    > directory, you may also want to look at the local::lib module, which
    > will help you set up your environment so modules are installed to and
    > loaded from there automatically. This also means you can use a CPAN
    > client to install modules with their dependencies automatically; cpanm
    > (on CPAN as App::cpanminus) has explicit support for installing into a
    > local::lib-managed directory.
    >
    > Ben
    >


    Installing by Build.PL --install_base flag works perfectly and so does the
    methods offered by Net::IDN::Encode to convert IDN strings to/from ASCII.
    I will bear the module management techniques in mind for future use.

    Thank you for the clear and detailed explanation!

    Tuxedo
     
    Tuxedo, Nov 12, 2012
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UnVkeQ==?=

    Sub Dir, Virtual dir, what do I use?

    =?Utf-8?B?UnVkeQ==?=, Jun 12, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    438
    =?Utf-8?B?UnVkeQ==?=
    Jun 12, 2005
  2. Jan Burse

    java.net.IDN jar for JDK 1.5?

    Jan Burse, Jul 26, 2011, in forum: Java
    Replies:
    5
    Views:
    981
    Arne Vajhøj
    Jul 28, 2011
  3. Hadmut Danisch

    IDN Internation Domain Names?

    Hadmut Danisch, Jul 23, 2005, in forum: Ruby
    Replies:
    3
    Views:
    100
    Dominik Bathon
    Jul 25, 2005
  4. Matthew Denner
    Replies:
    1
    Views:
    196
  5. Kga Agk
    Replies:
    2
    Views:
    156
    Kga Agk
    Jun 29, 2009
Loading...

Share This Page