Re^2: creating utility in perl
by Anonymous Monk on Jul 04, 2013 at 06:11 UTC
|
hey if I use PAR::Packer , then the user will have to install cpan in his system as well . I want to create like we use utilities , no need of installing anything , just execute and give the inputs .
So what if I have cpans in my program as well , I just need to know two things
1) Do every user using this standalone , will have to install this PAR::Packer , or just the creator
2) What if in the script some CPan is used , after PAR::Packer ,do every user will have to install that CPAN also
the thing is I wish to make it user friendly , so i need to abstract all these things from user
| [reply] |
|
|
hey if I use PAR::Packer , then the user will ahve to install cpan in his system as well.
Did you even read the documentation? (Nevermind, we already know the answer to that question.)
This is exactly what PAR::Packer, and the pp utility are designed to avoid. The point is that using a solution such as PAR::Packer you can distribute a standalone application.
| [reply] |
|
|
The pp utility in PAR::Packer will bundle your code, the modules needed by your code and the Perl interpreter into a stand-alone executable. That means the executable contains everything needed to run the script. For example, let's say that you've got two systems that have the same OS, but Perl is only installed on system A. So you create a Perl script on system A and use pp to create an executable. You can now take that executable to system B and it will be able run the executable just fine. System B could have no Perl installed, different version of Perl installed, missing required modules, etc. and none of that matters because it is using the contents of the executable.
There are some caveats and exceptions to what I described above, but what I described is accurate. Try installing PAR::Packer and read up on the documentation of the pp utility. It will do exactly what you're wanting to do.
| [reply] |
|
|
| [reply] |
|
|
hey
so i will give you the entire detail of what , how I have done , and the issue I am having .
I have a script which uses Text::CSV cpan , I installed that cpan in my PC and its working fine . Now I wanted to make an exe file ,so I installed PAR::Packer and pp and created .exe successfully with this code pp -o packed.exe source.pl
so now when I run this executable on some other system which does not have this Text::CSV cpan it fails . I want that user without installing this cpan , and if possible even without installing perl be able to execute this exe file
Is it possible for me to be able to do it
FYI i also did pp -P -o packed.pl source.pl to make a packaged file , but when I execute it , an error saying "The application has failed to start because perl516.dll was not found " is shown
| [reply] [d/l] [select] |
|
|
wow long post , I have followed every step as you guys described installed PAR::Packer and pp . It is confirmed they are installed properly as cpan in strawberry says so .
The a.exe is created in PAR::Packer , but it does not run , if I click on it , it opens momentarily dies and via command prompt too the same thing is happening . I can't understand the reason why ?
And with me there is no proxy issue
| [reply] |
|
|
|
|
|
|
|
so I just have to type these commands before my script to do so , if not then how to do it ??
% pp -o packed.exe source.pl
$ packed.exe
sorry for asking so basic questions , first time user | [reply] [d/l] |
|
|
|
|
|
|
|