1INN::Config(3pm) InterNetNews Documentation INN::Config(3pm)
2
3
4
6 Config.pm - Export all the variables an INN Perl script might need
7
9 This Perl module sets up any and all the variables that an INN Perl
10 script might need. More particularly, it allows to use inn.conf
11 variables: they are all provided by innconfval, as well as the version
12 of INN (in the variable $INN::Config::version). Other useful variables
13 are also provided (directories, files, programs, masks, parameters) and
14 you should have a look at the source code of the module to see what you
15 can use in your Perl scripts.
16
17 You only have to declare the module at the beginning of them:
18
19 use lib '<pathnews>/lib/perl';
20 use INN::Config;
21
22 Then, you can for instance use:
23
24 print $INN::Config::localmaxartsize;
25
26 to print the value of localmaxartsize as it is set in inn.conf.
27
28 You can also specify a version when you import the module. If you
29 write:
30
31 use INN::Config 2.5.0;
32
33 only versions of INN superior to 2.5.0 will be able to run the Perl
34 script.
35
36 It is also possible to import the variables directly in your namespace
37 if you specify what you want to import:
38
39 use INN::Config qw($localmaxartsize $pathbin);
40
41 Note that a legacy innshellvars.pl is also provided in pathnews/lib for
42 compatibility reasons with old Perl scripts not shipped with INN. It
43 was used by versions of INN anterior to 2.5.0. The corresponding
44 scripts for Shell and Tcl are, however, still in use: innshellvars and
45 innshellvars.tcl. They offer the same capabilities as this module.
46
48 innshellvars.pl was written by James Brister <brister@vix.com> for
49 InterNetNews in 1996. It was converted to the INN::Config Perl module
50 by Julien Elie in 2007.
51
52 $Id: Config.pm.in 8357 2009-02-27 17:56:00Z iulius $
53
55 inn.conf(5), innconfval(1), perl(1).
56
57
58
59INN 2.5.2 2009-05-21 INN::Config(3pm)