Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Using File::Share and PerlApp

by ali0sha (Sexton)
on May 26, 2015 at 12:17 UTC ( #1127811=perlquestion: print w/replies, xml ) Need Help??

ali0sha has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to create an application which uses a manifest.xml. Now in order to access this both while developing and using it, we can use File::Share as recommended in Using File::ShareDir in development, but I also want to be able to access it when it's packaged using PerlApp. Is my only recourse something like this? It seems inelegant, to say the least...

use FindBin '$Bin'; use File::Share 'dist_dir'; my $result; # Get the version bound by PerlApp $result = PerlApp::extract_bound_file("manifest.xml") if defined $PerlApp::VERSION; # Get the distribution's shared files directory $result ||= dist_dir('App-SFDC', 'manifest.xml');

Replies are listed 'Best First'.
Re: Using File::Share and PerlApp (elegance)
by Anonymous Monk on May 26, 2015 at 21:50 UTC

    Is my only recourse something like this? It seems inelegant, to say the least...

    First get something that works, because good enough should be your goal, it works for nature :)

    Also, elegance is easy , just hide the inelegance

    use MyPappyShare qw/ dist_dir /; my $result = dist_dir('App-SFDC', 'manifest.xml');

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1127811]
Front-paged by Corion
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2022-01-24 17:36 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (64 votes). Check out past polls.