Giter VIP home page Giter VIP logo

local-lib's People

Contributors

arodland avatar bobtfish avatar dolmen avatar garu avatar getty avatar haarg avatar hiratara avatar karenetheridge avatar mattlaw avatar miyagawa avatar native-api avatar osfameron avatar shadowcat-mst avatar xdg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

local-lib's Issues

[FEATURE] additional import option

I am looking for an import option that could be used to activate a given directory only if it exists. The option name could be --activate-if-exists. A message could be printed if the activation was not done. This message could be suppressed, if the --quiet option is set too. If this is a reasonable feature, could this be implemented please.

Precedence issue with $SHELL, no 'tcsh' love

guess_shell will warn with unassigned variable warnings if $SHELL is not set.

Also, if $SHELL is 'tcsh', you get 'sh' style output instead of 'csh' style

Suggested fix:

  my $shellbin
    = defined $ENV{SHELL}
      ? ($ENV{SHELL} =~ /([\w.]+)$/)[-1]
    : ( ( $^O eq 'MSWin32' && exists $ENV{'!EXITCODE'} )
      ? 'bash'
    : ( ( $^O eq 'MSWin32' && $ENV{PROMPT} && $ENV{COMSPEC} )
      ? ($ENV{COMSPEC} =~ /([\w.]+)$/)[-1]
    : ( ( $^O eq 'MSWin32' && !$ENV{PROMPT} )
      ? 'powershell.exe'
    : 'sh' )));

  for ($shellbin) {
    return
        /t?csh$/                 ? 'csh'
      : /fish$/                  ? 'fish'
      : /command(?:\.com)?$/i    ? 'cmd'
      : /cmd(?:\.exe)?$/i        ? 'cmd'
      : /4nt(?:\.exe)?$/i        ? 'cmd'
      : /powershell(?:\.exe)?$/i ? 'powershell'
                                 : 'bourne';
  }
}

Install local::lib with --bootstrap requires local::lib?

Hello,

I am working on a system where I do not have root privileges. I am trying to install local::lib so that I can then install other perl modules locally.

I was following the bootstrap instructions and tried the 2 following commands:
perl Makefile.PL --bootstrap
perl Makefile.PL --bootstrap=~/perl5

Both fail with:

Can't locate local/lib.pm in @INC (@INC contains: lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at Makefile.PL line 110.

I am confused as it seems it is then asking for local::lib, which is is precisely what I am trying to install?

Thanks in advance for the help.

Detect powershell on Unix

Powershell has existed on Linux and Mac for a while now, but guess_shelltype will only give powershell if $^O is windows.

Powershell can be detected by exists $ENV{PSModulePath}.

2.000024: test suite is failing

+ cd local-lib-2.000024
+ /usr/bin/make -O -j48 V=1 VERBOSE=1 test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/bad_variables.t ...... ok
t/carp-mismatch.t ...... ok
t/classmethod.t ........ ok
t/de-dup.t ............. ok
t/lib-core-only.t ...... ok
t/pipeline.t ........... ok

#   Failed test 'fish: activate PATH'
#   at t/shell.t line 200.
#          got: '/tmp/local-lib-shell-NO6umh/bin:/:^/dev/null'
#     expected: '/tmp/local-lib-shell-NO6umh/bin:/'

#   Failed test 'fish: deactivate PATH'
#   at t/shell.t line 208.
#          got: '/:^/dev/null:^/dev/null'
#     expected: '/'
# Looks like you failed 2 tests of 192.
t/shell.t ..............
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/192 subtests
t/stackable.t .......... ok
t/subroutine-in-inc.t .. ok
t/taint-mode.t ......... ok

Test Summary Report
-------------------
t/shell.t            (Wstat: 512 Tests: 192 Failed: 2)
  Failed tests:  169, 174
  Non-zero exit status: 2
Files=10, Tests=244,  8 wallclock secs ( 0.15 usr  0.04 sys +  4.38 cusr  3.26 csys =  7.83 CPU)
Result: FAIL
Failed 1/10 test programs. 2/244 subtests failed.
make: *** [Makefile:825: test_dynamic] Error 255

Check for make program before bootstrapping

If make (or equivalent) isn't installed, bootstrapping will fail mysteriously. I just beat my head into the wall trying to figure out the problem until I remembered that build-essential wasn't installed.

local::lib should check that $Config{make} is in PATH and abort with a helpful error.

ensure arch directory exists

(Filed on https://rt.cpan.org/Public/Bug/Display.html?id=86120 ages ago, under Module::Install by mistake I don't know why. Re-filing here)

re: miyagawa/cpanminus#263

When you setup local::lib on the shell, you'll get environment variables such as:

export PERL5LIB="/Users/miyagawa/perl5/lib/perl5:$PERL5LIB";

suppose you don't have the ~/perl5/lib/perl5 directory yet, and run
perl with that PERL5LIB, your @inc looks like:

@inc:
/Users/miyagawa/perl5/lib/perl5
/Users/miyagawa/.plenv/versions/5.18.0/lib/perl5/site_perl/5.18.0/darwin-2level
...

Once you have installed at least one arch-dependent (XS) module, your
@inc becomes:

@inc:
/Users/miyagawa/perl5/lib/perl5/darwin-2level
/Users/miyagawa/perl5/lib/perl5
/Users/miyagawa/.plenv/versions/5.18.0/lib/perl5/site_perl/5.18.0/darwin-2level
...

If you 'use local::lib' in your code, this isn't an issue since local::lib puts archlib in @inc explicitly. With PERL5LIB, perl doesn't put archlib unless the directory exists :/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.