1INN::Config(3pm)          InterNetNews Documentation          INN::Config(3pm)
2
3
4

NAME

6       INN::Config - Export all the variables an INN Perl script might need
7

DESCRIPTION

9       This Perl module sets up any and all the variables that an INN Perl
10       script might need.  More particularly, it allows using inn.conf
11       variables: they are all provided by innconfval, as well as the version
12       of INN (in the variable $INN::Config::VERSION for its short number
13       form, on in $INN::Config::version for its complete form).  Other useful
14       variables are also provided (directories, files, programs, masks,
15       parameters).  The complete list can be obtained with the following
16       script that prints them out:
17
18           use lib '<pathnews>/lib/perl';
19           use INN::Config;
20           use Data::Dumper;
21
22           my ($varname, $value);
23           foreach my $var (@INN::Config::EXPORT_OK) {
24               if ($var =~ /^\$(.*)$/) {
25                   $varname = "INN::Config::$1";
26                   $value = Dumper($$varname);
27                   $value =~ s/^\$VAR1 = //;
28                   print "\$$varname = $value";
29               } elsif ($var =~ /^\@(.*)$/) {
30                   $varname = "INN::Config::$1";
31                   $value = Dumper(\@$varname);
32                   $value =~ s/^\$VAR1 = //;
33                   print "\@$varname = $value";
34               }
35           }
36
37       A local Perl script named innshellvars.pl.local in pathetc will be
38       loaded, if present and executable, at the end of the run of this
39       module.  A typical use is to add or override variables.
40
41       You only have to declare the module at the beginning of them:
42
43           use lib '<pathnews>/lib/perl';
44           use INN::Config;
45
46       Then, you can for instance use:
47
48           print $INN::Config::localmaxartsize;
49
50       to print the value of localmaxartsize as it is set in inn.conf.
51
52       You can also specify a version when you import the module.  If you
53       write:
54
55           use INN::Config 2.5.0;
56
57       only versions of INN superior to 2.5.0 will be able to run the Perl
58       script.
59
60       It is also possible to import the variables directly in your namespace
61       if you specify what you want to import:
62
63           use INN::Config qw($localmaxartsize $pathbin);
64
65       Note that a legacy innshellvars.pl is also provided in pathnews/lib for
66       compatibility reasons with old Perl scripts not shipped with INN.  It
67       was used by versions of INN anterior to 2.5.0.  The corresponding
68       scripts for Shell and Tcl are, however, still in use:  innshellvars and
69       innshellvars.tcl.  They offer the same capabilities as this module.
70

HISTORY

72       innshellvars.pl was written by James Brister <brister@vix.com> for
73       InterNetNews in 1996.  It was converted to the INN::Config Perl module
74       by Julien Elie in 2007.
75

SEE ALSO

77       inn.conf(5), innconfval(1), perl(1).
78
79
80
81INN 2.6.5                         2022-06-15                  INN::Config(3pm)
Impressum