From: Yury Aliaev <mutab0r@rambler.ru> To: ALT Linux Community <community@altlinux.ru> Subject: Re: [Comm] Модули и библиотеки в Perl Date: Thu, 06 Oct 2005 12:12:35 +0400 Message-ID: <4344DC73.5040201@rambler.ru> (raw) In-Reply-To: <op.sx33mx1ehz2pp6@oc.peooc.net> Aleksander N. Gorohovski пишет: > On Mon, 03 Oct 2005 19:12:48 +0400, Yury Aliaev wrote: > >> Добрый вечер! >> >> У меня возник вопрос: я сейчас пилю один набор программ на Perl. Там >> имеется некоторое количество общего кода, который логично вынести в >> отдельный файл. Как известно, в Перле есть две возможности: >> организовать библиотеку (с расширением .pl) и затем подключать с >> помощью require или модуль (.pm) и подключать с помощью use. Является >> ли сейчас какой-нибудь из этих способов предпочтительным или всё >> равно, что использовать? Если делать модуль, то понятно, куда его >> складывать -- в /usr/lib/Perl5/по_вкусу, а если библиотеку, то её >> куда класть? > > Да всё равно куда (хоть в тот же каталог, где и основная программа) > :-) > Это потом в require укажешь путь к ней. > require '</path/file.pl> '; Прграмма лежит в /usr/bin. Класть туда библиотеки -- дважды некошёрно (т.к. сами они исполнимыми файлами не являются, да и засорять /usr/bin не хорошо, там и так тесно). > >> Естественно, всё говорится при условии, что на машине стоит ALT Linux. > > А это всё равно в каком дистрибутиве. Всё же есть некоторые стандартные директории, где разные вещи лежат. И от одного дистра к другому это может слегка меняться. P.S. Всё же я склоняюсь в пользу модулей, похоже так правильнее.
next prev parent reply other threads:[~2005-10-06 8:12 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-10-03 15:12 Yury Aliaev 2005-10-04 4:46 ` Alexey V. Novikov 2005-10-04 8:09 ` Aleksander N. Gorohovski 2005-10-06 8:12 ` Yury Aliaev [this message] 2005-10-06 7:20 ` Aleksander N. Gorohovski 2005-10-06 10:30 ` Yury Aliaev
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=4344DC73.5040201@rambler.ru \ --to=mutab0r@rambler.ru \ --cc=community@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
ALT Linux Community general discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 community community/ http://lore.altlinux.org/community \ mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com public-inbox-index community Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.community AGPL code for this site: git clone https://public-inbox.org/public-inbox.git