Skip Menu |

This queue is for tickets about the Portable CPAN distribution.

Report information
The Basics
Id: 105395
Status: open
Priority: 0/
Queue: Portable

People
Owner: Nobody in particular
Requestors: RIVY [...] cpan.org
Cc: adamk [...] cpan.org
CHORNY [...] cpan.org
kmx [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: adamk [...] cpan.org, kmx [...] cpan.org
Subject: Configuring portable perl (for a "semi-portable" installation)
After "installing" a portable perl installation onto a PC (i.e., by using `scoop` [https://github.com/lukesampson/scoop]), I'd like to customize the install to access my home path using the usually recommended File::HomePath methods. `scoop` installs the portable perl package in a directory under my home directory (%LOCALAPPDATA%) and sets up the PATH to make perl accessible. It does this to avoid requiring any elevated security levels for installation. So, it's really a regular installation into an unusual path. Parenthetically, I'm not sure that installation of the usual perl onto that path wouldn't work just as well, but I'm not privvy to the thoughts behind their choice of "portable perl". Given this type of "semi-portable" installation, I'd like to be able to configure portable.perl to access the usual directories (~ aka %USERPROFILE%, etc.). To accomplish just the %USERPROFILE% access, I could make "<PERL_ROOT_PATH>/data" a symbolic link to "%USERPROFILE%", but that seems hackish. Alternatively, the most straight forward method seems to me to be modifying the configuration in the `portable.perl` file. But, currently, HomePath:my_home path is just tacked onto <PERL_ROOT_PATH> no matter whether it's a relative or absolute path. So, that won't work. However, the code within "Portable" could be modified to use absolute directories when specified (which I'm happy to do, and, if you have a repo somewhere, then send you a pull request). As I don't fully grok the larger design picture of "Portable", I'm not sure of the ramifications of making such a change. But, I think it might be nice to move toward having a fully relocatable perl installation which can still access all of the host resources like a normal perl installation (hence, "semi-portable"). If this all seems like a wrong-headed direction or non-productive for you, I can start expermenting with using a full perl installation placed solely within the USER directory tree. If that works, I can set up my own bucket for scoop and/or discuss changing the copy that `scoop` installs with it's creator. Do you have any input on this? Thanks for your attention.
Subject: Re: [rt.cpan.org #105395] Configuring portable perl (for a "semi-portable" installation)
Date: Sun, 21 Jun 2015 22:32:36 +0200
To: bug-Portable [...] rt.cpan.org
From: kmx <kmx [...] cpan.org>
Try to: 0/ perl -MFile::HomeDir -E "say File::HomeDir->my_home" 1/ remove the line set HOME=%~dp0data from portableshell.bat 2/ remove the whole section HomeDir: my_home: data my_data: data from portable.perl 3/ perl -MFile::HomeDir -E "say File::HomeDir->my_home" -- kmx
From: RIVY [...] cpan.org
On Sun Jun 21 16:32:53 2015, KMX wrote: Show quoted text
> Try to: > > 0/ perl -MFile::HomeDir -E "say File::HomeDir->my_home" > > 1/ remove the line > set HOME=%~dp0data > from portableshell.bat > > 2/ remove the whole section > HomeDir: > my_home: data > my_data: data > from portable.perl > > 3/ perl -MFile::HomeDir -E "say File::HomeDir->my_home" > > -- > kmx >
Yes, that worked. Thanks for the rapid response. I'll create a post_install script that removes the HomeDir section from "portable.perl" and the HOME line from "portableshell.bat". Should I consider removal of those lines a dependable/canonical way to disable the customization of HomeDir by Portable? Or do you see it changing in the future? When I submit the "semi-portable" fix, I want to comment on possible future maintenance issues. Thanks again.