Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: pp (PAR-Packer) - how to access included data files

by bliako (Monsignor)
on Nov 07, 2022 at 09:27 UTC ( [id://11148023]=note: print w/replies, xml ) Need Help??


in reply to Re^2: pp (PAR-Packer) - how to access included data files
in thread pp (PAR-Packer) - how to access included data files

dirname($ENV{PAR_0}) . "/inc".

Why you want to go low level when you have this? :

# PAR::read_file() returns a file inside any loaded PARs my $conf = PAR::read_file('data/MyConfig.yaml');

(from SYNOPSIS)

Replies are listed 'Best First'.
Re^4: pp (PAR-Packer) - how to access included data files
by ibm1620 (Hermit) on Nov 07, 2022 at 22:57 UTC

      sorted link thanks

Re^4: pp (PAR-Packer) - how to access included data files
by ibm1620 (Hermit) on Nov 07, 2022 at 16:58 UTC
    I must have overlooked read_file(). Thanks.

    In my case, the easiest approach was to doctor the @ARGV before processing it, as follows:

    if (exists $ENV{PAR_TEMP}){ # running via PAR/pp push @ARGV, "$ENV{PAR_TEMP}/inc/lex.dict"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11148023]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-25 07:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found