Note that there are some explanatory texts on larger screens.

plurals
  1. POIncluding files in pm modul
    primarykey
    data
    text
    <p>I am totally new to Perl/Fastcgi. </p> <p>I have some pm-modules to which will have to add a lot of scripts and over time it will grow and grow. Hence, I need a structure which makes the admin easier. </p> <p>So, I want to create files in some kind of directory structure which I can include. I want the files that I include will be exaclty like if the text were written in the file where I do the include.</p> <p>I have tried 'do', 'use' and 'require'. The actual file I want to include is in one of the directories Perl is looking in. (verified using perl -V)</p> <p>I have tried within and outside BEGIN {}. </p> <p>How do I do this? Is it possible at all including pm files in pm files? Does it have to be pm-files I include or can it be any extension?</p> <p>I have tried several ways, included below is my last try.</p> <p>Config.pm</p> <pre><code>package Kernel::Config; sub Load { #other activities require 'severalnines.pm'; #other activities } 1; </code></pre> <p>severalnines.pm</p> <pre><code># Filter Queues $Self-&gt;{TicketAcl}-&gt;{'ACL-hide-queues'} = { Properties =&gt; { }, PossibleNot =&gt; {Ticket =&gt; { Queue =&gt; ['[RegExp]^*'] }, }, }; 1; </code></pre> <p>I'm not getting any errors in the Apache's error_log related to this. Still, the code is not recognized like it would be if I put it in the Config.pm file. </p> <p>I am not about to start programming a lot, just do some admin in a 3rd party application. Still, I have searched around trying to learn how it works with including files. Is the severalnines.pm considered to be a perl module and do I need to use a program like h2xs, or similar, in order to "create" the module (told you, totally newbie...)? </p> <p>Thanks in advance!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload