Home: Perl Programming Help: Beginner:
Correct Perl 24 modules for apache server



digioleg54
User

Apr 25, 2017, 9:15 AM


Views: 937
Correct Perl 24 modules for apache server

Some Perl modules are using shell command, like hostname. I need them for apache. Where can I find the correct source code?


FishMonger
Veteran / Moderator

Apr 25, 2017, 11:36 AM


Views: 931
Re: [digioleg54] Correct Perl 24 modules for apache server

Your question is not very clear, but maybe what you're needing is the Sys::Hostname module. It's a core module so it should already be installed on your system.

https://metacpan.org/pod/Sys::Hostname


(This post was edited by FishMonger on Apr 25, 2017, 11:36 AM)


digioleg54
User

Apr 25, 2017, 11:50 AM


Views: 925
Re: [FishMonger] Correct Perl 24 modules for apache server

That is where I take them from. But it is related to my one more question: I need modules for apache, but some of them are using UNIX related command, for example

Code
my $var =  `hostname`


Do I have to change them on apache?

Thanks


FishMonger
Veteran / Moderator

Apr 25, 2017, 12:03 PM


Views: 919
Re: [digioleg54] Correct Perl 24 modules for apache server


Quote
I need modules for apache, but some of them are using UNIX related command

That doesn't make any sense.

The command/code to get the hostname doesn't have anything to do with apache. The command/code you use will depend on the OS and available Perl modules.


Laurent_R
Veteran / Moderator

Apr 25, 2017, 11:13 PM


Views: 909
Re: [digioleg54] Correct Perl 24 modules for apache server

I have already told you that, contrary to what you seem to believe, you server is not running Apache ex nihilo, out of nowhere. There has to be an operating system underneath. So long as you don't understand that, your questions will make very little sense or no sense at all.

Please ask your sysadmin to explain you the software architecture of your server and understand it.