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

Re: Par::Packer, include conf files or not ?

by marto (Bishop)
on Sep 24, 2012 at 09:16 UTC ( #995323=note: print w/ replies, xml ) Need Help??


in reply to Par::Packer, include conf files or not ?

" I developped a Perl script on Red Hat Stawberry Perl"

Strawberry Perl is for Microsoft Windows only.

"(I know that this operation will hide the source code but that's also something I'm looking for...)"

pp won't protect your source code. PAR::FAQ.

"I'd like to deploy this script in various environnements (Windows, Red Hat, Open SUSE, ...) and to do so I did my research and discovered pp (PAR::Packer) that seems to answer my problems."

Just so you're sure, you'll need to create an exe to cover each binary platform On what platforms can I run PAR? On what platforms will the resulting executable run? and more in PAR::FAQ.

"I tried to install Par::Packer from CPAN on my developpment environnement, but the installation failed, so I'm having one major question about Par::Packer that I'd like to be answered"

How did it fail? See How do I post a question effectively?.

"Do I need to include that root-logger.conf in the files that Par::Packer will package (like I'd add a library) or will my module still be able to read it if I leave it "outside" the packaged file ?"

pp see the -a option for adding files. Alternatively have them in a directory you control, however this seems unlikely given the number of environments you want to target.

Update: fixed a couple of typos.


Comment on Re: Par::Packer, include conf files or not ?
Re^2: Par::Packer, include conf files or not ?
by HJO (Acolyte) on Sep 24, 2012 at 09:51 UTC

    Hi,

    First of all, thanks for your answer, then I appologize for the lack of information of my post or the (now obviously) absurdity that I've said.

    "pp won't protect your source code. PAR::FAQ."

    I did read this FAQ and I think I didn't express myself correctly, I do not intent to absolutely protect my code from everyone, I know it's simply impossible... What I intend to do is simply deliver a file.exe (on Windows) or a file.sh (on Unix), without the need to install all the modules and add all the libs. The file itself will not be a script.pl, but something a little bit less understandable and of a very simpler use...

    "Just so you're sure, you'll need to create an exe to cover each binary platform"

    Yes, that's basicaly what I intended to do, I would deliver the file "upon request" to the OS that have been specified

    "How did it fail?"

    Even if I know that fixing the installation issues I have will also answer my question, I didn't ask on my installation issues, I asked on the behavior of the module itself, so I didn't include a long log of my console when the installation failed (PAR::Packer has a lot a dependencies) to avoid unnecessary informations. If you think this information is necessary to answer me, I'll join it in the next answer

    "pp see the -a option for adding files."

    I already looked the CPAN presentation of pp (http://search.cpan.org/~rschupp/PAR-Packer-1.013/lib/pp.pm), but my question was intended for developpers which already used pp and knew if the packaged module was still able to read external files or if I had to include them.

    Regards.

      "Even if I know that fixing the installation issues I have will also answer my question, I didn't ask on my installation issues, I asked on the behavior of the module itself, so I didn't include a long log of my console when the installation failed (PAR::Packer has a lot a dependencies) to avoid unnecessary informations. If you think this information is necessary to answer me, I'll join it in the next answer"

      It's not required to answer your question, but if you can't install pp how to you expect to use it to develop and test your application in it's packaged form?

      "but my question was intended for developpers which already used pp and knew if the packaged module was still able to read external files or if I had to include them."

      I answered your question, of course a package generated by pp can read files external to it, since you're going to delopy to many servers which you may not have control over, do you think it's wise? Hence my pp -a suggestion. That said, had you a working pp installed you'd be able to test this for yourself.

        "but if you can't install pp how to you expect to use it to develop and test your application in it's packaged form?"

        I understand your point, and I'm working on that part of the problem.

        "of course a package generated by pp can read files external to it"

        That's what I needed to know, thanks. It wasn't obvious for me, I thought that the script was "converted" or so and was asking myself if the result will still be able to process some external files

        "since you're going to delopy to many servers which you may not have control over, do you think it's wise?"

        I think I'm going to follow my first though that you confirmed, I will include every single file in my package.

        "That said, had you a working pp installed you'd be able to test this for yourself."

        Yes, I know that and I'm going to try to install it properly to make my tests... If that doesn't work out well, I'll probably post something else in a few days... Anyway thank you for your answers

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-12-21 09:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (104 votes), past polls