.pm文件 [英] .pm file

查看:114
本文介绍了.pm文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以告诉我在哪个文件夹中保存.pm文件.......我们可以将.pm文件保存在我们保存.pl文件的同一个文件夹中吗?

can somebody tell me in which folder do we save .pm files.......can we save the .pm files in the same folder where we save .pl files?

推荐答案

对于相同目录:

我们可以将.pm和.pl文件保存在同一目录中

eg;

Example.pm

Test_Example.pl

这些是我们的.pm和.pl文件


我们只需要提及以下内容在Test_Example.pl文件中,

使用示例;


对于不同的目录:

如果我们想保留.pl和。 pm在不同的目录中,

然后如果你在你目前的目录中创建Module目录以保持

你的.pm文件分开,


然后你只需要在Test_Example.pl中提供Example.pm文件的路径,

使用Module :: Example


这里模块是目录哪个包含Example.pm模块
For Same Directory:
we can keep .pm and .pl file in same directory
e.g;
Example.pm
Test_Example.pl
these are our .pm and .pl file

we just need to mention following thing in Test_Example.pl file,
use Example;

For Different Directory:
if we want to keep .pl and .pm in different directories,
then if you create Module directory inside your present directory to keep
your .pm files separate,

then you just need to provide the path for Example.pm file in Test_Example.pl by,
use Module::Example

here Module is directory which contains Example.pm module


我问的是第二个选项,我们需要将.pm文件保存在bin文件夹中?

感谢您的回复。


i was asking about the second option, do we need to save the .pm files inside the bin folder??
thanks for the reply.




相同目录:

我们可以将.pm和.pl文件保存在同一目录中

eg;

Example.pm

Test_Example.pl

这些是我们的.pm和.pl文件


我们只需要在Test_Example.pl文件中提及以下内容,

使用示例;


对于不同的目录:

如果我们想将.pl和.pm保存在不同的目录中,

那么如果你创建你目前目录中的模块目录保持

你的.pm文件分开,


那么你只需要在Test_Example中提供Example.pm文件的路径。 pl by,

使用Module :: Example


这里模块是包含Example.pm模块的目录
For Same Directory:
we can keep .pm and .pl file in same directory
e.g;
Example.pm
Test_Example.pl
these are our .pm and .pl file

we just need to mention following thing in Test_Example.pl file,
use Example;

For Different Directory:
if we want to keep .pl and .pm in different directories,
then if you create Module directory inside your present directory to keep
your .pm files separate,

then you just need to provide the path for Example.pm file in Test_Example.pl by,
use Module::Example

here Module is directory which contains Example.pm module


您可以将它们保存在您想要的任何地方。没有必要将它们保存在cgi-bin文件夹中。但是如果你愿意,你可以。
You can save them almost anywhere you want. It''s not necessary to save them in the cgi-bin folder. But you can if you want to.


这篇关于.pm文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆