Comments (8)
Given the docs for the two variables:
$*PROGRAM-NAME Path to the current executable as it was entered on the command line, or C<-e> if perl was invoked with the -e flag.
$*PROGRAM Location (in the form of an C<IO::Path> object) of the Perl program being executed.
Wouldn't your proposal break all possible usefulness of these variables, save displaying a name to a human? For example say "This program has {+$*PROGRAM.lines} of code in it"
will error out with file not found error.
from ecosystem.
I guess this is somewhat complicated by the original script (which is installed with the hashed name,) being executed by a wrapper which is installed with the original name.
The script is run by the wrapper with something like:
exit run($*EXECUTABLE, @binaries[0].hash.<files><bin/originalname>, @*ARGS).exitcode
Where @binaries
is the result of searching for matching distributions.
So as far as everything is concerned when it gets to run the original script the installed hashed name is the program name.
I guess the wrapper could set an environment variable with the original name of the script which could then be used by USAGE
if set, or even set some further dynvar (such as $*ORIGINAL-PROGRAM-NAME
, but I agree you probably don't want to be changing the $*PROGRAM
or $*PROGRAM-NAME
for the reasons stated.
from ecosystem.
which could then be used by USAGE if set
Pretty sure the USAGE is already fixed to display a friendly name
from ecosystem.
Ah yes, so it is, but it's done by setting an environment variable in the wrapper so for anything installed before that changed it won't be there :-\ I do have a plan to move more of the actual code of the wrapper into Compunit::Respository so it's easier to take advantage of these kind of changes, but obviously that won't help in this case :)
from ecosystem.
@tbrowder in this case I think it's upgrade your Rakudo if you didn't already and then reinstall the distribution that provides the script with --force - that should get you the fixed wrapper :)
from ecosystem.
Okay, I wasn't aware of those changes, and I just updated my rakudo to latest nom branch a few days ago. So that is a reinstall of zef with --force?
ALso, "$?USAGE" seems not to be defined unless you define a MAIN sub.
from ecosystem.
Ping?
from ecosystem.
This issue has been resolved in rakudo awhile back.
from ecosystem.
Related Issues (20)
- Check for incorrect version strings (including an v at the beginning)
- Testing fails in distributions where provided files are generated in the Build phase
- Testing should be smarter
- Only source-url is checked for source and downloading
- Test script only works on git URIs in source
- Test script fails in a weird way if no distribution name is present
- git: URIs for source-urls work to download source, but then fail test
- Spin off module testing to a specific distribution
- Besides checking source-url, we need to figure out the way to check non-git source-urls
- "No license" passes tests
- Should I submit here and at PAUSE?
- The test script does not understand git URIs
- Modules by deceased community members HOT 4
- Modules with external dependencies could specify a Docker container to test them HOT 2
- DBIish HOT 4
- "Error accessing GitHub API. HTTP Code: 401" HOT 14
- When installing Pod::To::HTML, Raku::Pod::Render ver<3.5.2> tries to install HOT 4
- Create a VSCode dev container for Raku HOT 5
- Some tarballs on REA have 0 bytes
- [File::Temp] Add File::Temp to https://github.com/raku-community-modules HOT 13
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 ecosystem.