What is the difference between installing the perl module and copying the entire folder?

I installed the perl module, say, XYZ, then a folder is created containing many .pm files. I copied the folder and placed it on any other system where XYZ is not installed.

So, I can use the methods of the XYZ module in both systems. I mean, I can’t find out the difference between these methods, but I think there must be something. I know that when we install the perl module, then dependencies are also installed. I'm right? Can someone mention another difference between the two, if any?

+5
source share
1 answer

A little from the head:

  • In the case of the XS module, the code is compiled for the local platform.
  • Installing the module through cpan usually starts a test suite, so if there is any other reason beyond the dependencies why this does not work, they tell you so (I think this is very rare, though)
  • Regular installation automatically goes to the directory where your perl can find the modules.

Of course, you yourself can take care of all this. These days it’s very good that you use Linux or Windows on something x86-ish, and as long as you copy only Linux to Linux and Windows to Windows, and in the same place as in the source system, you you'll be fine, Basically, what Linux binary distributions and ActivePerl packages do, and that might make sense, for example. if you want to avoid installing a number of compile-time dependencies on all target systems. Just make sure you don’t get in a mess by writing to system directories (e.g. /usr/share/perl5 ) that should be managed by your system package manager.

+6
source

Source: https://habr.com/ru/post/1237727/


All Articles