Comments (9)
cpanminus has been suggested.
Kane also points out that cpanp already does zero-conf. I'm skeptical.
from perl5i.
cpanm seems like a sane fit here, or are there other issues that should be addressed?
from perl5i.
cpanm mostly solves the problem. It certainly saves us from having to write our own.
What's missing from stock cpanm is you still have to configure it to install into your home directory and Perl to look there. As an example of the problem, look at the Quickstart Guide For Unix which shows how to solve that once and for all with perlbrew and cpam.
perlbrew might be overkill. Perhaps all we need is a utility to spit out the necessary environment variables, a la local::lib, which can be appended to your .bash_profile
.
Ideally, I'd like to be able to let a user install perl5i in three commands and using their system perl.
- Download and install cpanm
- Download and append environment variables to ~/.bash_profile
- Install perl5i.
This could be...
# http://cpanmin.us/local would be a special cpanm installer that installs to ~/bin
# It doesn't exist.
curl -L http://cpanmin.us/local | perl - App::cpanminus
# Append the `export PERLBLAH` stuff from local::lib to your .bash_profile.
# This also doesn't exist.
curl -L http://cpanmin.us/local.bashrc > ~/.bash_profile
# Install perl5i
cpanm perl5i
These don't have to be cpanmin.us URLs, they could be perl5i github pages URLs to start. Point is its three commands that can be cut & pasted into just about any Unix shell.
from perl5i.
Why not just toss that script up as is and then we can just:
curl -L http://SCRIPTURL | bash -
Then it's just one command for the user to copy/paste
from perl5i.
I'm not comfortable with altering the user's permanent settings automatically. And they could be using .profile
. They could be using a different shell.
They also need to make the environment changes in their current shell as well, or restart it.
from perl5i.
Fair objections to the all in one and done solution. Though seems that the way that perlbrew handles this is just say something like: all done now copy these lines in to your start up thinggie. Thus leaving that last step up to the user and when it breaks it's there problem. Also the script is open for all to see if some one wants to follow most of the steps but put things in other locations (for example).
Not a real solution on my part, I guess more banter from the me.
from perl5i.
On the one hand, it would be great if we could automate this. OTOH shell configurations are complicated things.
First pass, reduce our quickstart by removing perlbrew from the equation. perlbrew is great, but it takes a long time and doesn't help if you want to use a specific instance of perl.
Second pass, get it down to the three steps I mentioned.
Third pass, write something which will try to figure out which shell you're using and what file to append to. Offer to do it automatically, but leave it as a prompt. I wouldn't be surprised if local::lib already has most of this.
from perl5i.
+1
from perl5i.
I've cut down the installation process to just altering .bashrc to do the local::lib thing and installing perl5i. It's something you can cut and paste into the shell. I'm calling it good enough to close this up.
https://github.com/schwern/perl5i/wiki/Quickstart-Guide-For-Unix
from perl5i.
Related Issues (20)
- prove perl5i HOT 2
- backport postfix-dereference
- v2.13.0 HOT 1
- Integrate Path::Tiny tempdir, tempfile and rootdir
- Have other file operations return Path::Tiny objects
- ARGV tests failing with utf8-all 0.013 or later HOT 7
- consider changing IRC metadata to use 'IRC' field HOT 3
- Update recommended autodie for better performance HOT 2
- v2.13.1 HOT 1
- perl5i -e trying to open command line arguments as Perl files.
- Switch to JSON::MaybeXS
- stat() in array context does not work with perl 5.23.3 and greater HOT 5
- [PATCH] fix some spelling mistakes on the POD HOT 1
- Most Windows failures because of IPC::System::Simple
- [PATCH] fix typo HOT 1
- ->method treats sub stubs inconsistently HOT 4
- A "boolify" operator.
- Module version declarations have circular dependency on this distribution HOT 3
- can't install perl5i::latest on windows.
- Test suite failing with recent Devel::Declare HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from perl5i.