[21744] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3948 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Oct 10 14:16:09 2002

Date: Thu, 10 Oct 2002 11:15:25 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 10 Oct 2002     Volume: 10 Number: 3948

Today's topics:
    Re: Problem with require() versus in-line code <jan@klaverstijn.nl>
    Re: Problem with require() versus in-line code <dd@4pro.net>
    Re: Problem with require() versus in-line code <jan@klaverstijn.nl>
    Re: Problem with require() versus in-line code <dd@4pro.net>
    Re: Problem with require() versus in-line code <jan@klaverstijn.nl>
    Re: Problem with require() versus in-line code <dd@4pro.net>
    Re: Problem with require() versus in-line code <jan@klaverstijn.nl>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Thu, 10 Oct 2002 17:38:42 +0200
From: "Jan Klaverstijn" <jan@klaverstijn.nl>
Subject: Re: Problem with require() versus in-line code
Message-Id: <3da59f02$0$11213$1b62eedf@news.euronet.nl>

I tried your suggestions as far as either supported by my Perl version
(5.00503) or as far as I understood them. Using "vars" did get rid of the
messages but the underlying problem (an unititialized data structure) did
not disappear.

The solution with a package and :: is obscure to me: if I declare "package
conf;" in file_a.pl that I require in file_b.pl and refer to my data
structure as
                      for my $where ( @{ $conf::fetchmailrc{servers} } ) {
it still won' work.

I must admit I had hoped it would be easier. More like #include as in C. The
file with the datastructure I wish to include is automaticaly generated.
Just a config dump from fetchmail I tweaked from Python to Perl.. It seemed
easy enough to just #include that in another script. I understand now it's
not like that.

So I hope my package reference above is broken and easily fixed. Otherwisre
I'll have to revert to another advice, from Koos Pol, to implement a sub in
the package and call that. This would bridge the namespaces but makes the
file generation process more complicated.

Thanks so far,
Jan.


"Domizio Demichelis" <dd@4pro.net> wrote in message
news:ao3qk2$j2uft$1@ID-159100.news.dfncis.de...
> perldoc -f my
>
> A "my" declares the listed variables to be local (lexically) to
> the enclosing block, file, or "eval". ...
>
> perldoc -f our
>
> An "our" declares the listed variables to be valid globals
> within the enclosing block, file, or "eval". ...
>
> perldoc vars
>
> ... This will predeclare all the variables whose names are in the list,
> allowing you to use them under "use strict", and disabling any typo
> warnings. ...
>
> perldoc -f package
>
> ... You can refer to variables and filehandles in other
>  packages by prefixing the identifier with the package name and a
>  double colon: "$Package::Variable". If the package name is null,
>  the "main" package as assumed. That is, "$::sail" is equivalent
>  to "$main::sail" (as well as to "$main'sail", still seen in
>  older code).
>
>
> --
> -.. --- -- .. --.. .. ---
> -.. . -- .. -.-. .... . .-.. .. ...
>
>




------------------------------

Date: Thu, 10 Oct 2002 11:47:03 -0400
From: "Domizio Demichelis" <dd@4pro.net>
Subject: Re: Problem with require() versus in-line code
Message-Id: <ao47ek$ir8tu$1@ID-159100.news.dfncis.de>

> The solution with a package and :: is obscure to me: if I declare "package
> conf;" in file_a.pl that I require in file_b.pl and refer to my data
> structure as
>                       for my $where ( @{ $conf::fetchmailrc{servers} } ) {
> it still won' work.

I think it could be a problem in the structure itself. Please could you post
the entire definition of the structure, so we can understand better the
problem?

Thank you

--
-.. --- -- .. --.. .. ---
-.. . -- .. -.-. .... . .-.. .. ...





------------------------------

Date: Thu, 10 Oct 2002 17:59:10 +0200
From: "Jan Klaverstijn" <jan@klaverstijn.nl>
Subject: Re: Problem with require() versus in-line code
Message-Id: <3da5a3cd$0$11202$1b62eedf@news.euronet.nl>

Shure. here it is. It's a bit long but hey, ..

Thanks for being so on top of this.

This is my current test.pl, the one that gets executed:

#!/usr/bin/perl -w
use strict;
require "conf.pl";
# Traversing the tree
for my $where ( @{ $fetchmailrc{servers} } ) {
   print ("Server: $where->{pollname}\n");
   for my $who ( @{ $where->{users} } ) {
      print ("\tuser=$who->{remote} password=$who->{password}\n");
   }
}

This is my "include file", actually called conf.pl:

use strict;
use constant TRUE => 1;
use constant FALSE => 0;
my $os_type = 'linux';
my @feature_options = ('pop3','imap','etrn','odmr',);
# Start of configuration initializer
my %fetchmailrc = (
    poll_interval => 300,
    logfile => 'None',
    idfile => '/root/.fetchids',
    postmaster => 'postmaster',
    bouncemail => TRUE,
    spambounce => FALSE,
    properties => 'None',
    invisible => FALSE,
    showdots => FALSE,
    syslog => TRUE,
    # List of server entries begins here
    servers => [    # Entry for site `pop.euronet.nl' begins:
    {
 pollname => 'pop.euronet.nl',
 active => TRUE,
 via => 'None',
 protocol => 'POP3',
 port => 0,
 timeout => 300,
 interval => 0,
 envelope => 'Received',
 envskip => 1,
 qvirtual => 'None',
 auth => 'any',
 dns => FALSE,
 uidl => TRUE,
 aka => [ qw(euronet.nl euro.net neptune.euro.net) ],
 localdomains => [ qw(klaverstijn.nl) ],
 interface => 'None',
 monitor => 'None',
 plugin => 'None',
 plugout => 'None',
 principal => 'None',
 tracepolls => FALSE,
 users => [
     {
  remote => 'arkldesign@klaverstijn.nl',
  password => '*****',
  localnames => [ qw(arkldesign) ],
  fetchall => FALSE,
  keep => TRUE,
  flush => FALSE,
  rewrite => TRUE,
  stripcr => FALSE,
  forcecr => FALSE,
  pass8bits => FALSE,
  dropstatus => FALSE,
  dropdelivered => FALSE,
  mimedecode => FALSE,
  idle => FALSE,
  mda => 'None',
  bsmtp => 'None',
  lmtp => FALSE,
  preconnect => '/usr/local/bin/mailfilter',
  postconnect => 'None',
  limit => 0,
  warnings => 3600,
  fetchlimit => 0,
  batchlimit => 0,
  expunge => 0,
  properties => 'None',
  smtphunt => [ qw(localhost) ],
  fetchdomains => [],
  smtpaddress => 'None',
  smtpname => 'None',
  antispam => '',
  mailboxes => [ qw() ],
     }
     ,     {
  remote => 'karin.van.elck@klaverstijn.nl',
  password => '*******,
  localnames => [ qw(karin) ],
  fetchall => FALSE,
  keep => TRUE,
  flush => FALSE,
  rewrite => TRUE,
  stripcr => FALSE,
  forcecr => FALSE,
  pass8bits => FALSE,
  dropstatus => FALSE,
  dropdelivered => FALSE,
  mimedecode => FALSE,
  idle => FALSE,
  mda => 'None',
  bsmtp => 'None',
  lmtp => FALSE,
  preconnect => 'None',
  postconnect => 'None',
  limit => 0,
  warnings => 3600,
  fetchlimit => 0,
  batchlimit => 0,
  expunge => 0,
  properties => 'None',
  smtphunt => [ qw(localhost) ],
  fetchdomains => [],
  smtpaddress => 'None',
  smtpname => 'None',
  antispam => '',
  mailboxes => [ qw() ],
     }
     ,     {
  remote => 'karin@klaverstijn.nl',
  password => '******',
  localnames => [ qw(karin) ],
  fetchall => FALSE,
  keep => TRUE,
  flush => FALSE,
  rewrite => TRUE,
  stripcr => FALSE,
  forcecr => FALSE,
  pass8bits => FALSE,
  dropstatus => FALSE,
  dropdelivered => FALSE,
  mimedecode => FALSE,
  idle => FALSE,
  mda => 'None',
  bsmtp => 'None',
  lmtp => FALSE,
  preconnect => 'None',
  postconnect => 'None',
  limit => 0,
  warnings => 3600,
  fetchlimit => 0,
  batchlimit => 0,
  expunge => 0,
  properties => 'None',
  smtphunt => [ qw(localhost) ],
  fetchdomains => [],
  smtpaddress => 'None',
  smtpname => 'None',
  antispam => '',
  mailboxes => [ qw() ],
     }
     ,     {
  remote => 'arjen@klaverstijn.nl',
  password => '*****',
  localnames => [ qw(arjen) ],
  fetchall => FALSE,
  keep => TRUE,
  flush => FALSE,
  rewrite => TRUE,
  stripcr => FALSE,
  forcecr => FALSE,
  pass8bits => FALSE,
  dropstatus => FALSE,
  dropdelivered => FALSE,
  mimedecode => FALSE,
  idle => FALSE,
  mda => 'None',
  bsmtp => 'None',
  lmtp => FALSE,
  preconnect => 'None',
  postconnect => 'None',
  limit => 0,
  warnings => 3600,
  fetchlimit => 0,
  batchlimit => 0,
  expunge => 0,
  properties => 'None',
  smtphunt => [ qw(localhost) ],
  fetchdomains => [],
  smtpaddress => 'None',
  smtpname => 'None',
  antispam => '',
  mailboxes => [ qw() ],
     }
     ,     {
  remote => 'jan@klaverstijn.nl',
  password => '****',
  localnames => [ qw(root *) ],
  fetchall => FALSE,
  keep => TRUE,
  flush => FALSE,
  rewrite => TRUE,
  stripcr => FALSE,
  forcecr => FALSE,
  pass8bits => FALSE,
  dropstatus => FALSE,
  dropdelivered => FALSE,
  mimedecode => FALSE,
  idle => FALSE,
  mda => 'None',
  bsmtp => 'None',
  lmtp => FALSE,
  preconnect => 'None',
  postconnect => 'None',
  limit => 0,
  warnings => 3600,
  fetchlimit => 0,
  batchlimit => 0,
  expunge => 0,
  properties => 'None',
  smtphunt => [ qw(localhost) ],
  fetchdomains => [],
  smtpaddress => 'None',
  smtpname => 'None',
  antispam => '',
  mailboxes => [ qw() ],
     }
     ,     {
  remote => 'niek@klaverstijn.nl',
  password => '******',
  localnames => [ qw(niek) ],
  fetchall => FALSE,
  keep => TRUE,
  flush => FALSE,
  rewrite => TRUE,
  stripcr => FALSE,
  forcecr => FALSE,
  pass8bits => FALSE,
  dropstatus => FALSE,
  dropdelivered => FALSE,
  mimedecode => FALSE,
  idle => FALSE,
  mda => 'None',
  bsmtp => 'None',
  lmtp => FALSE,
  preconnect => 'None',
  postconnect => 'None',
  limit => 0,
  warnings => 3600,
  fetchlimit => 0,
  batchlimit => 0,
  expunge => 0,
  properties => 'None',
  smtphunt => [ qw(localhost) ],
  fetchdomains => [],
  smtpaddress => 'None',
  smtpname => 'None',
  antispam => '',
  mailboxes => [ qw() ],
     }
     ,     {
  remote => 'vince@klaverstijn.nl',
  password => '*****',
  localnames => [ qw(vince) ],
  fetchall => FALSE,
  keep => TRUE,
  flush => FALSE,
  rewrite => TRUE,
  stripcr => FALSE,
  forcecr => FALSE,
  pass8bits => FALSE,
  dropstatus => FALSE,
  dropdelivered => FALSE,
  mimedecode => FALSE,
  idle => FALSE,
  mda => 'None',
  bsmtp => 'None',
  lmtp => FALSE,
  preconnect => 'None',
  postconnect => 'None',
  limit => 0,
  warnings => 3600,
  fetchlimit => 0,
  batchlimit => 0,
  expunge => 0,
  properties => 'None',
  smtphunt => [ qw(localhost) ],
  fetchdomains => [],
  smtpaddress => 'None',
  smtpname => 'None',
  antispam => '',
  mailboxes => [ qw() ],
     }
     ,     {
  remote => 'cas@klaverstijn.nl',
  password => '******',
  localnames => [ qw(cas) ],
  fetchall => FALSE,
  keep => TRUE,
  flush => FALSE,
  rewrite => TRUE,
  stripcr => FALSE,
  forcecr => FALSE,
  pass8bits => FALSE,
  dropstatus => FALSE,
  dropdelivered => FALSE,
  mimedecode => FALSE,
  idle => FALSE,
  mda => 'None',
  bsmtp => 'None',
  lmtp => FALSE,
  preconnect => 'None',
  postconnect => 'None',
  limit => 0,
  warnings => 3600,
  fetchlimit => 0,
  batchlimit => 0,
  expunge => 0,
  properties => 'None',
  smtphunt => [ qw(localhost) ],
  fetchdomains => [],
  smtpaddress => 'None',
  smtpname => 'None',
  antispam => '',
  mailboxes => [ qw() ],
     }
     , ]
    }
]
);# End of initializer




"Domizio Demichelis" <dd@4pro.net> wrote in message
news:ao47ek$ir8tu$1@ID-159100.news.dfncis.de...
> > The solution with a package and :: is obscure to me: if I declare
"package
> > conf;" in file_a.pl that I require in file_b.pl and refer to my data
> > structure as
> >                       for my $where ( @{ $conf::fetchmailrc{servers} } )
{
> > it still won' work.
>
> I think it could be a problem in the structure itself. Please could you
post
> the entire definition of the structure, so we can understand better the
> problem?
>
> Thank you
>
> --
> -.. --- -- .. --.. .. ---
> -.. . -- .. -.-. .... . .-.. .. ...
>
>
>




------------------------------

Date: Thu, 10 Oct 2002 12:20:16 -0400
From: "Domizio Demichelis" <dd@4pro.net>
Subject: Re: Problem with require() versus in-line code
Message-Id: <ao49ct$j241j$1@ID-159100.news.dfncis.de>

Bad name after None' at conf.pl line 91.

please check the syntax of the file...

then you can refer to %fetchmailrc both in the conf.pl and in the test.pl as
%::fetchmailrc  or $::fetchmailrc{key} and it will be ok under strict.

try and let us know.

dd
--
-.. --- -- .. --.. .. ---
-.. . -- .. -.-. .... . .-.. .. ...


"Jan Klaverstijn" <jan@klaverstijn.nl> wrote in message
news:3da5a3cd$0$11202$1b62eedf@news.euronet.nl...
> Shure. here it is. It's a bit long but hey, ..
>
> Thanks for being so on top of this.
>
> This is my current test.pl, the one that gets executed:
>
> #!/usr/bin/perl -w
> use strict;
> require "conf.pl";
> # Traversing the tree
> for my $where ( @{ $fetchmailrc{servers} } ) {
>    print ("Server: $where->{pollname}\n");
>    for my $who ( @{ $where->{users} } ) {
>       print ("\tuser=$who->{remote} password=$who->{password}\n");
>    }
> }
>
> This is my "include file", actually called conf.pl:
>
> use strict;
> use constant TRUE => 1;
> use constant FALSE => 0;
> my $os_type = 'linux';
> my @feature_options = ('pop3','imap','etrn','odmr',);
> # Start of configuration initializer
> my %fetchmailrc = (
>     poll_interval => 300,
>     logfile => 'None',
>     idfile => '/root/.fetchids',
>     postmaster => 'postmaster',
>     bouncemail => TRUE,
>     spambounce => FALSE,
>     properties => 'None',
>     invisible => FALSE,
>     showdots => FALSE,
>     syslog => TRUE,
>     # List of server entries begins here
>     servers => [    # Entry for site `pop.euronet.nl' begins:
>     {
>  pollname => 'pop.euronet.nl',
>  active => TRUE,
>  via => 'None',
>  protocol => 'POP3',
>  port => 0,
>  timeout => 300,
>  interval => 0,
>  envelope => 'Received',
>  envskip => 1,
>  qvirtual => 'None',
>  auth => 'any',
>  dns => FALSE,
>  uidl => TRUE,
>  aka => [ qw(euronet.nl euro.net neptune.euro.net) ],
>  localdomains => [ qw(klaverstijn.nl) ],
>  interface => 'None',
>  monitor => 'None',
>  plugin => 'None',
>  plugout => 'None',
>  principal => 'None',
>  tracepolls => FALSE,
>  users => [
>      {
>   remote => 'arkldesign@klaverstijn.nl',
>   password => '*****',
>   localnames => [ qw(arkldesign) ],
>   fetchall => FALSE,
>   keep => TRUE,
>   flush => FALSE,
>   rewrite => TRUE,
>   stripcr => FALSE,
>   forcecr => FALSE,
>   pass8bits => FALSE,
>   dropstatus => FALSE,
>   dropdelivered => FALSE,
>   mimedecode => FALSE,
>   idle => FALSE,
>   mda => 'None',
>   bsmtp => 'None',
>   lmtp => FALSE,
>   preconnect => '/usr/local/bin/mailfilter',
>   postconnect => 'None',
>   limit => 0,
>   warnings => 3600,
>   fetchlimit => 0,
>   batchlimit => 0,
>   expunge => 0,
>   properties => 'None',
>   smtphunt => [ qw(localhost) ],
>   fetchdomains => [],
>   smtpaddress => 'None',
>   smtpname => 'None',
>   antispam => '',
>   mailboxes => [ qw() ],
>      }
>      ,     {
>   remote => 'karin.van.elck@klaverstijn.nl',
>   password => '*******,
>   localnames => [ qw(karin) ],
>   fetchall => FALSE,
>   keep => TRUE,
>   flush => FALSE,
>   rewrite => TRUE,
>   stripcr => FALSE,
>   forcecr => FALSE,
>   pass8bits => FALSE,
>   dropstatus => FALSE,
>   dropdelivered => FALSE,
>   mimedecode => FALSE,
>   idle => FALSE,
>   mda => 'None',
>   bsmtp => 'None',
>   lmtp => FALSE,
>   preconnect => 'None',
>   postconnect => 'None',
>   limit => 0,
>   warnings => 3600,
>   fetchlimit => 0,
>   batchlimit => 0,
>   expunge => 0,
>   properties => 'None',
>   smtphunt => [ qw(localhost) ],
>   fetchdomains => [],
>   smtpaddress => 'None',
>   smtpname => 'None',
>   antispam => '',
>   mailboxes => [ qw() ],
>      }
>      ,     {
>   remote => 'karin@klaverstijn.nl',
>   password => '******',
>   localnames => [ qw(karin) ],
>   fetchall => FALSE,
>   keep => TRUE,
>   flush => FALSE,
>   rewrite => TRUE,
>   stripcr => FALSE,
>   forcecr => FALSE,
>   pass8bits => FALSE,
>   dropstatus => FALSE,
>   dropdelivered => FALSE,
>   mimedecode => FALSE,
>   idle => FALSE,
>   mda => 'None',
>   bsmtp => 'None',
>   lmtp => FALSE,
>   preconnect => 'None',
>   postconnect => 'None',
>   limit => 0,
>   warnings => 3600,
>   fetchlimit => 0,
>   batchlimit => 0,
>   expunge => 0,
>   properties => 'None',
>   smtphunt => [ qw(localhost) ],
>   fetchdomains => [],
>   smtpaddress => 'None',
>   smtpname => 'None',
>   antispam => '',
>   mailboxes => [ qw() ],
>      }
>      ,     {
>   remote => 'arjen@klaverstijn.nl',
>   password => '*****',
>   localnames => [ qw(arjen) ],
>   fetchall => FALSE,
>   keep => TRUE,
>   flush => FALSE,
>   rewrite => TRUE,
>   stripcr => FALSE,
>   forcecr => FALSE,
>   pass8bits => FALSE,
>   dropstatus => FALSE,
>   dropdelivered => FALSE,
>   mimedecode => FALSE,
>   idle => FALSE,
>   mda => 'None',
>   bsmtp => 'None',
>   lmtp => FALSE,
>   preconnect => 'None',
>   postconnect => 'None',
>   limit => 0,
>   warnings => 3600,
>   fetchlimit => 0,
>   batchlimit => 0,
>   expunge => 0,
>   properties => 'None',
>   smtphunt => [ qw(localhost) ],
>   fetchdomains => [],
>   smtpaddress => 'None',
>   smtpname => 'None',
>   antispam => '',
>   mailboxes => [ qw() ],
>      }
>      ,     {
>   remote => 'jan@klaverstijn.nl',
>   password => '****',
>   localnames => [ qw(root *) ],
>   fetchall => FALSE,
>   keep => TRUE,
>   flush => FALSE,
>   rewrite => TRUE,
>   stripcr => FALSE,
>   forcecr => FALSE,
>   pass8bits => FALSE,
>   dropstatus => FALSE,
>   dropdelivered => FALSE,
>   mimedecode => FALSE,
>   idle => FALSE,
>   mda => 'None',
>   bsmtp => 'None',
>   lmtp => FALSE,
>   preconnect => 'None',
>   postconnect => 'None',
>   limit => 0,
>   warnings => 3600,
>   fetchlimit => 0,
>   batchlimit => 0,
>   expunge => 0,
>   properties => 'None',
>   smtphunt => [ qw(localhost) ],
>   fetchdomains => [],
>   smtpaddress => 'None',
>   smtpname => 'None',
>   antispam => '',
>   mailboxes => [ qw() ],
>      }
>      ,     {
>   remote => 'niek@klaverstijn.nl',
>   password => '******',
>   localnames => [ qw(niek) ],
>   fetchall => FALSE,
>   keep => TRUE,
>   flush => FALSE,
>   rewrite => TRUE,
>   stripcr => FALSE,
>   forcecr => FALSE,
>   pass8bits => FALSE,
>   dropstatus => FALSE,
>   dropdelivered => FALSE,
>   mimedecode => FALSE,
>   idle => FALSE,
>   mda => 'None',
>   bsmtp => 'None',
>   lmtp => FALSE,
>   preconnect => 'None',
>   postconnect => 'None',
>   limit => 0,
>   warnings => 3600,
>   fetchlimit => 0,
>   batchlimit => 0,
>   expunge => 0,
>   properties => 'None',
>   smtphunt => [ qw(localhost) ],
>   fetchdomains => [],
>   smtpaddress => 'None',
>   smtpname => 'None',
>   antispam => '',
>   mailboxes => [ qw() ],
>      }
>      ,     {
>   remote => 'vince@klaverstijn.nl',
>   password => '*****',
>   localnames => [ qw(vince) ],
>   fetchall => FALSE,
>   keep => TRUE,
>   flush => FALSE,
>   rewrite => TRUE,
>   stripcr => FALSE,
>   forcecr => FALSE,
>   pass8bits => FALSE,
>   dropstatus => FALSE,
>   dropdelivered => FALSE,
>   mimedecode => FALSE,
>   idle => FALSE,
>   mda => 'None',
>   bsmtp => 'None',
>   lmtp => FALSE,
>   preconnect => 'None',
>   postconnect => 'None',
>   limit => 0,
>   warnings => 3600,
>   fetchlimit => 0,
>   batchlimit => 0,
>   expunge => 0,
>   properties => 'None',
>   smtphunt => [ qw(localhost) ],
>   fetchdomains => [],
>   smtpaddress => 'None',
>   smtpname => 'None',
>   antispam => '',
>   mailboxes => [ qw() ],
>      }
>      ,     {
>   remote => 'cas@klaverstijn.nl',
>   password => '******',
>   localnames => [ qw(cas) ],
>   fetchall => FALSE,
>   keep => TRUE,
>   flush => FALSE,
>   rewrite => TRUE,
>   stripcr => FALSE,
>   forcecr => FALSE,
>   pass8bits => FALSE,
>   dropstatus => FALSE,
>   dropdelivered => FALSE,
>   mimedecode => FALSE,
>   idle => FALSE,
>   mda => 'None',
>   bsmtp => 'None',
>   lmtp => FALSE,
>   preconnect => 'None',
>   postconnect => 'None',
>   limit => 0,
>   warnings => 3600,
>   fetchlimit => 0,
>   batchlimit => 0,
>   expunge => 0,
>   properties => 'None',
>   smtphunt => [ qw(localhost) ],
>   fetchdomains => [],
>   smtpaddress => 'None',
>   smtpname => 'None',
>   antispam => '',
>   mailboxes => [ qw() ],
>      }
>      , ]
>     }
> ]
> );# End of initializer
>
>
>
>
> "Domizio Demichelis" <dd@4pro.net> wrote in message
> news:ao47ek$ir8tu$1@ID-159100.news.dfncis.de...
> > > The solution with a package and :: is obscure to me: if I declare
> "package
> > > conf;" in file_a.pl that I require in file_b.pl and refer to my data
> > > structure as
> > >                       for my $where ( @{
$conf::fetchmailrc{servers} } )
> {
> > > it still won' work.
> >
> > I think it could be a problem in the structure itself. Please could you
> post
> > the entire definition of the structure, so we can understand better the
> > problem?
> >
> > Thank you
> >
> > --
> > -.. --- -- .. --.. .. ---
> > -.. . -- .. -.-. .... . .-.. .. ...
> >
> >
> >
>
>






------------------------------

Date: Thu, 10 Oct 2002 18:32:51 +0200
From: "Jan Klaverstijn" <jan@klaverstijn.nl>
Subject: Re: Problem with require() versus in-line code
Message-Id: <3da5abb3$0$11199$1b62eedf@news.euronet.nl>

Domizio,

Do you refer to the line

  antispam => '',

?

These are two single quotes.

Otherwise, could you give me some context so I can spot the problem?

I removed these lines and still no luck.

Jan.


"Domizio Demichelis" <dd@4pro.net> wrote in message
news:ao49ct$j241j$1@ID-159100.news.dfncis.de...
> Bad name after None' at conf.pl line 91.
>
> please check the syntax of the file...
>
> then you can refer to %fetchmailrc both in the conf.pl and in the test.pl
as
> %::fetchmailrc  or $::fetchmailrc{key} and it will be ok under strict.
>
> try and let us know.
>
> dd
> --
> -.. --- -- .. --.. .. ---
> -.. . -- .. -.-. .... . .-.. .. ...
>
>
> "Jan Klaverstijn" <jan@klaverstijn.nl> wrote in message
> news:3da5a3cd$0$11202$1b62eedf@news.euronet.nl...
> > Shure. here it is. It's a bit long but hey, ..
> >
> > Thanks for being so on top of this.
> >
> > This is my current test.pl, the one that gets executed:
> >
> > #!/usr/bin/perl -w
> > use strict;
> > require "conf.pl";
> > # Traversing the tree
> > for my $where ( @{ $fetchmailrc{servers} } ) {
> >    print ("Server: $where->{pollname}\n");
> >    for my $who ( @{ $where->{users} } ) {
> >       print ("\tuser=$who->{remote} password=$who->{password}\n");
> >    }
> > }
> >
> > This is my "include file", actually called conf.pl:
> >
> > use strict;
> > use constant TRUE => 1;
> > use constant FALSE => 0;
> > my $os_type = 'linux';
> > my @feature_options = ('pop3','imap','etrn','odmr',);
> > # Start of configuration initializer
> > my %fetchmailrc = (
> >     poll_interval => 300,
> >     logfile => 'None',
> >     idfile => '/root/.fetchids',
> >     postmaster => 'postmaster',
> >     bouncemail => TRUE,
> >     spambounce => FALSE,
> >     properties => 'None',
> >     invisible => FALSE,
> >     showdots => FALSE,
> >     syslog => TRUE,
> >     # List of server entries begins here
> >     servers => [    # Entry for site `pop.euronet.nl' begins:
> >     {
> >  pollname => 'pop.euronet.nl',
> >  active => TRUE,
> >  via => 'None',
> >  protocol => 'POP3',
> >  port => 0,
> >  timeout => 300,
> >  interval => 0,
> >  envelope => 'Received',
> >  envskip => 1,
> >  qvirtual => 'None',
> >  auth => 'any',
> >  dns => FALSE,
> >  uidl => TRUE,
> >  aka => [ qw(euronet.nl euro.net neptune.euro.net) ],
> >  localdomains => [ qw(klaverstijn.nl) ],
> >  interface => 'None',
> >  monitor => 'None',
> >  plugin => 'None',
> >  plugout => 'None',
> >  principal => 'None',
> >  tracepolls => FALSE,
> >  users => [
> >      {
> >   remote => 'arkldesign@klaverstijn.nl',
> >   password => '*****',
> >   localnames => [ qw(arkldesign) ],
> >   fetchall => FALSE,
> >   keep => TRUE,
> >   flush => FALSE,
> >   rewrite => TRUE,
> >   stripcr => FALSE,
> >   forcecr => FALSE,
> >   pass8bits => FALSE,
> >   dropstatus => FALSE,
> >   dropdelivered => FALSE,
> >   mimedecode => FALSE,
> >   idle => FALSE,
> >   mda => 'None',
> >   bsmtp => 'None',
> >   lmtp => FALSE,
> >   preconnect => '/usr/local/bin/mailfilter',
> >   postconnect => 'None',
> >   limit => 0,
> >   warnings => 3600,
> >   fetchlimit => 0,
> >   batchlimit => 0,
> >   expunge => 0,
> >   properties => 'None',
> >   smtphunt => [ qw(localhost) ],
> >   fetchdomains => [],
> >   smtpaddress => 'None',
> >   smtpname => 'None',
> >   antispam => '',
> >   mailboxes => [ qw() ],
> >      }
> >      ,     {
> >   remote => 'karin.van.elck@klaverstijn.nl',
> >   password => '*******,
> >   localnames => [ qw(karin) ],
> >   fetchall => FALSE,
> >   keep => TRUE,
> >   flush => FALSE,
> >   rewrite => TRUE,
> >   stripcr => FALSE,
> >   forcecr => FALSE,
> >   pass8bits => FALSE,
> >   dropstatus => FALSE,
> >   dropdelivered => FALSE,
> >   mimedecode => FALSE,
> >   idle => FALSE,
> >   mda => 'None',
> >   bsmtp => 'None',
> >   lmtp => FALSE,
> >   preconnect => 'None',
> >   postconnect => 'None',
> >   limit => 0,
> >   warnings => 3600,
> >   fetchlimit => 0,
> >   batchlimit => 0,
> >   expunge => 0,
> >   properties => 'None',
> >   smtphunt => [ qw(localhost) ],
> >   fetchdomains => [],
> >   smtpaddress => 'None',
> >   smtpname => 'None',
> >   antispam => '',
> >   mailboxes => [ qw() ],
> >      }
> >      ,     {
> >   remote => 'karin@klaverstijn.nl',
> >   password => '******',
> >   localnames => [ qw(karin) ],
> >   fetchall => FALSE,
> >   keep => TRUE,
> >   flush => FALSE,
> >   rewrite => TRUE,
> >   stripcr => FALSE,
> >   forcecr => FALSE,
> >   pass8bits => FALSE,
> >   dropstatus => FALSE,
> >   dropdelivered => FALSE,
> >   mimedecode => FALSE,
> >   idle => FALSE,
> >   mda => 'None',
> >   bsmtp => 'None',
> >   lmtp => FALSE,
> >   preconnect => 'None',
> >   postconnect => 'None',
> >   limit => 0,
> >   warnings => 3600,
> >   fetchlimit => 0,
> >   batchlimit => 0,
> >   expunge => 0,
> >   properties => 'None',
> >   smtphunt => [ qw(localhost) ],
> >   fetchdomains => [],
> >   smtpaddress => 'None',
> >   smtpname => 'None',
> >   antispam => '',
> >   mailboxes => [ qw() ],
> >      }
> >      ,     {
> >   remote => 'arjen@klaverstijn.nl',
> >   password => '*****',
> >   localnames => [ qw(arjen) ],
> >   fetchall => FALSE,
> >   keep => TRUE,
> >   flush => FALSE,
> >   rewrite => TRUE,
> >   stripcr => FALSE,
> >   forcecr => FALSE,
> >   pass8bits => FALSE,
> >   dropstatus => FALSE,
> >   dropdelivered => FALSE,
> >   mimedecode => FALSE,
> >   idle => FALSE,
> >   mda => 'None',
> >   bsmtp => 'None',
> >   lmtp => FALSE,
> >   preconnect => 'None',
> >   postconnect => 'None',
> >   limit => 0,
> >   warnings => 3600,
> >   fetchlimit => 0,
> >   batchlimit => 0,
> >   expunge => 0,
> >   properties => 'None',
> >   smtphunt => [ qw(localhost) ],
> >   fetchdomains => [],
> >   smtpaddress => 'None',
> >   smtpname => 'None',
> >   antispam => '',
> >   mailboxes => [ qw() ],
> >      }
> >      ,     {
> >   remote => 'jan@klaverstijn.nl',
> >   password => '****',
> >   localnames => [ qw(root *) ],
> >   fetchall => FALSE,
> >   keep => TRUE,
> >   flush => FALSE,
> >   rewrite => TRUE,
> >   stripcr => FALSE,
> >   forcecr => FALSE,
> >   pass8bits => FALSE,
> >   dropstatus => FALSE,
> >   dropdelivered => FALSE,
> >   mimedecode => FALSE,
> >   idle => FALSE,
> >   mda => 'None',
> >   bsmtp => 'None',
> >   lmtp => FALSE,
> >   preconnect => 'None',
> >   postconnect => 'None',
> >   limit => 0,
> >   warnings => 3600,
> >   fetchlimit => 0,
> >   batchlimit => 0,
> >   expunge => 0,
> >   properties => 'None',
> >   smtphunt => [ qw(localhost) ],
> >   fetchdomains => [],
> >   smtpaddress => 'None',
> >   smtpname => 'None',
> >   antispam => '',
> >   mailboxes => [ qw() ],
> >      }
> >      ,     {
> >   remote => 'niek@klaverstijn.nl',
> >   password => '******',
> >   localnames => [ qw(niek) ],
> >   fetchall => FALSE,
> >   keep => TRUE,
> >   flush => FALSE,
> >   rewrite => TRUE,
> >   stripcr => FALSE,
> >   forcecr => FALSE,
> >   pass8bits => FALSE,
> >   dropstatus => FALSE,
> >   dropdelivered => FALSE,
> >   mimedecode => FALSE,
> >   idle => FALSE,
> >   mda => 'None',
> >   bsmtp => 'None',
> >   lmtp => FALSE,
> >   preconnect => 'None',
> >   postconnect => 'None',
> >   limit => 0,
> >   warnings => 3600,
> >   fetchlimit => 0,
> >   batchlimit => 0,
> >   expunge => 0,
> >   properties => 'None',
> >   smtphunt => [ qw(localhost) ],
> >   fetchdomains => [],
> >   smtpaddress => 'None',
> >   smtpname => 'None',
> >   antispam => '',
> >   mailboxes => [ qw() ],
> >      }
> >      ,     {
> >   remote => 'vince@klaverstijn.nl',
> >   password => '*****',
> >   localnames => [ qw(vince) ],
> >   fetchall => FALSE,
> >   keep => TRUE,
> >   flush => FALSE,
> >   rewrite => TRUE,
> >   stripcr => FALSE,
> >   forcecr => FALSE,
> >   pass8bits => FALSE,
> >   dropstatus => FALSE,
> >   dropdelivered => FALSE,
> >   mimedecode => FALSE,
> >   idle => FALSE,
> >   mda => 'None',
> >   bsmtp => 'None',
> >   lmtp => FALSE,
> >   preconnect => 'None',
> >   postconnect => 'None',
> >   limit => 0,
> >   warnings => 3600,
> >   fetchlimit => 0,
> >   batchlimit => 0,
> >   expunge => 0,
> >   properties => 'None',
> >   smtphunt => [ qw(localhost) ],
> >   fetchdomains => [],
> >   smtpaddress => 'None',
> >   smtpname => 'None',
> >   antispam => '',
> >   mailboxes => [ qw() ],
> >      }
> >      ,     {
> >   remote => 'cas@klaverstijn.nl',
> >   password => '******',
> >   localnames => [ qw(cas) ],
> >   fetchall => FALSE,
> >   keep => TRUE,
> >   flush => FALSE,
> >   rewrite => TRUE,
> >   stripcr => FALSE,
> >   forcecr => FALSE,
> >   pass8bits => FALSE,
> >   dropstatus => FALSE,
> >   dropdelivered => FALSE,
> >   mimedecode => FALSE,
> >   idle => FALSE,
> >   mda => 'None',
> >   bsmtp => 'None',
> >   lmtp => FALSE,
> >   preconnect => 'None',
> >   postconnect => 'None',
> >   limit => 0,
> >   warnings => 3600,
> >   fetchlimit => 0,
> >   batchlimit => 0,
> >   expunge => 0,
> >   properties => 'None',
> >   smtphunt => [ qw(localhost) ],
> >   fetchdomains => [],
> >   smtpaddress => 'None',
> >   smtpname => 'None',
> >   antispam => '',
> >   mailboxes => [ qw() ],
> >      }
> >      , ]
> >     }
> > ]
> > );# End of initializer
> >
> >
> >
> >
> > "Domizio Demichelis" <dd@4pro.net> wrote in message
> > news:ao47ek$ir8tu$1@ID-159100.news.dfncis.de...
> > > > The solution with a package and :: is obscure to me: if I declare
> > "package
> > > > conf;" in file_a.pl that I require in file_b.pl and refer to my data
> > > > structure as
> > > >                       for my $where ( @{
> $conf::fetchmailrc{servers} } )
> > {
> > > > it still won' work.
> > >
> > > I think it could be a problem in the structure itself. Please could
you
> > post
> > > the entire definition of the structure, so we can understand better
the
> > > problem?
> > >
> > > Thank you
> > >
> > > --
> > > -.. --- -- .. --.. .. ---
> > > -.. . -- .. -.-. .... . .-.. .. ...
> > >
> > >
> > >
> >
> >
>
>
>
>




------------------------------

Date: Thu, 10 Oct 2002 12:49:31 -0400
From: "Domizio Demichelis" <dd@4pro.net>
Subject: Re: Problem with require() versus in-line code
Message-Id: <ao4b40$jdbc9$1@ID-159100.news.dfncis.de>

please, check the syntax of the file, becaus it doesn't compile and returns
the error "Bad name after None' at conf.pl line 91"... dow it return the
same error when you check the syntax?

perl -cw conf.pl

--
-.. --- -- .. --.. .. ---
-.. . -- .. -.-. .... . .-.. .. ...


"Jan Klaverstijn" <jan@klaverstijn.nl> wrote in message
news:3da5abb3$0$11199$1b62eedf@news.euronet.nl...
> Domizio,
>
> Do you refer to the line
>
>   antispam => '',
>
> ?
>
> These are two single quotes.
>
> Otherwise, could you give me some context so I can spot the problem?
>
> I removed these lines and still no luck.
>
> Jan.
>
>
> "Domizio Demichelis" <dd@4pro.net> wrote in message
> news:ao49ct$j241j$1@ID-159100.news.dfncis.de...
> > Bad name after None' at conf.pl line 91.
> >
> > please check the syntax of the file...
> >
> > then you can refer to %fetchmailrc both in the conf.pl and in the
test.pl
> as
> > %::fetchmailrc  or $::fetchmailrc{key} and it will be ok under strict.
> >
> > try and let us know.
> >
> > dd
> > --
> > -.. --- -- .. --.. .. ---
> > -.. . -- .. -.-. .... . .-.. .. ...
> >
> >
> > "Jan Klaverstijn" <jan@klaverstijn.nl> wrote in message
> > news:3da5a3cd$0$11202$1b62eedf@news.euronet.nl...
> > > Shure. here it is. It's a bit long but hey, ..
> > >
> > > Thanks for being so on top of this.
> > >
> > > This is my current test.pl, the one that gets executed:
> > >
> > > #!/usr/bin/perl -w
> > > use strict;
> > > require "conf.pl";
> > > # Traversing the tree
> > > for my $where ( @{ $fetchmailrc{servers} } ) {
> > >    print ("Server: $where->{pollname}\n");
> > >    for my $who ( @{ $where->{users} } ) {
> > >       print ("\tuser=$who->{remote} password=$who->{password}\n");
> > >    }
> > > }
> > >
> > > This is my "include file", actually called conf.pl:
> > >
> > > use strict;
> > > use constant TRUE => 1;
> > > use constant FALSE => 0;
> > > my $os_type = 'linux';
> > > my @feature_options = ('pop3','imap','etrn','odmr',);
> > > # Start of configuration initializer
> > > my %fetchmailrc = (
> > >     poll_interval => 300,
> > >     logfile => 'None',
> > >     idfile => '/root/.fetchids',
> > >     postmaster => 'postmaster',
> > >     bouncemail => TRUE,
> > >     spambounce => FALSE,
> > >     properties => 'None',
> > >     invisible => FALSE,
> > >     showdots => FALSE,
> > >     syslog => TRUE,
> > >     # List of server entries begins here
> > >     servers => [    # Entry for site `pop.euronet.nl' begins:
> > >     {
> > >  pollname => 'pop.euronet.nl',
> > >  active => TRUE,
> > >  via => 'None',
> > >  protocol => 'POP3',
> > >  port => 0,
> > >  timeout => 300,
> > >  interval => 0,
> > >  envelope => 'Received',
> > >  envskip => 1,
> > >  qvirtual => 'None',
> > >  auth => 'any',
> > >  dns => FALSE,
> > >  uidl => TRUE,
> > >  aka => [ qw(euronet.nl euro.net neptune.euro.net) ],
> > >  localdomains => [ qw(klaverstijn.nl) ],
> > >  interface => 'None',
> > >  monitor => 'None',
> > >  plugin => 'None',
> > >  plugout => 'None',
> > >  principal => 'None',
> > >  tracepolls => FALSE,
> > >  users => [
> > >      {
> > >   remote => 'arkldesign@klaverstijn.nl',
> > >   password => '*****',
> > >   localnames => [ qw(arkldesign) ],
> > >   fetchall => FALSE,
> > >   keep => TRUE,
> > >   flush => FALSE,
> > >   rewrite => TRUE,
> > >   stripcr => FALSE,
> > >   forcecr => FALSE,
> > >   pass8bits => FALSE,
> > >   dropstatus => FALSE,
> > >   dropdelivered => FALSE,
> > >   mimedecode => FALSE,
> > >   idle => FALSE,
> > >   mda => 'None',
> > >   bsmtp => 'None',
> > >   lmtp => FALSE,
> > >   preconnect => '/usr/local/bin/mailfilter',
> > >   postconnect => 'None',
> > >   limit => 0,
> > >   warnings => 3600,
> > >   fetchlimit => 0,
> > >   batchlimit => 0,
> > >   expunge => 0,
> > >   properties => 'None',
> > >   smtphunt => [ qw(localhost) ],
> > >   fetchdomains => [],
> > >   smtpaddress => 'None',
> > >   smtpname => 'None',
> > >   antispam => '',
> > >   mailboxes => [ qw() ],
> > >      }
> > >      ,     {
> > >   remote => 'karin.van.elck@klaverstijn.nl',
> > >   password => '*******,
> > >   localnames => [ qw(karin) ],
> > >   fetchall => FALSE,
> > >   keep => TRUE,
> > >   flush => FALSE,
> > >   rewrite => TRUE,
> > >   stripcr => FALSE,
> > >   forcecr => FALSE,
> > >   pass8bits => FALSE,
> > >   dropstatus => FALSE,
> > >   dropdelivered => FALSE,
> > >   mimedecode => FALSE,
> > >   idle => FALSE,
> > >   mda => 'None',
> > >   bsmtp => 'None',
> > >   lmtp => FALSE,
> > >   preconnect => 'None',
> > >   postconnect => 'None',
> > >   limit => 0,
> > >   warnings => 3600,
> > >   fetchlimit => 0,
> > >   batchlimit => 0,
> > >   expunge => 0,
> > >   properties => 'None',
> > >   smtphunt => [ qw(localhost) ],
> > >   fetchdomains => [],
> > >   smtpaddress => 'None',
> > >   smtpname => 'None',
> > >   antispam => '',
> > >   mailboxes => [ qw() ],
> > >      }
> > >      ,     {
> > >   remote => 'karin@klaverstijn.nl',
> > >   password => '******',
> > >   localnames => [ qw(karin) ],
> > >   fetchall => FALSE,
> > >   keep => TRUE,
> > >   flush => FALSE,
> > >   rewrite => TRUE,
> > >   stripcr => FALSE,
> > >   forcecr => FALSE,
> > >   pass8bits => FALSE,
> > >   dropstatus => FALSE,
> > >   dropdelivered => FALSE,
> > >   mimedecode => FALSE,
> > >   idle => FALSE,
> > >   mda => 'None',
> > >   bsmtp => 'None',
> > >   lmtp => FALSE,
> > >   preconnect => 'None',
> > >   postconnect => 'None',
> > >   limit => 0,
> > >   warnings => 3600,
> > >   fetchlimit => 0,
> > >   batchlimit => 0,
> > >   expunge => 0,
> > >   properties => 'None',
> > >   smtphunt => [ qw(localhost) ],
> > >   fetchdomains => [],
> > >   smtpaddress => 'None',
> > >   smtpname => 'None',
> > >   antispam => '',
> > >   mailboxes => [ qw() ],
> > >      }
> > >      ,     {
> > >   remote => 'arjen@klaverstijn.nl',
> > >   password => '*****',
> > >   localnames => [ qw(arjen) ],
> > >   fetchall => FALSE,
> > >   keep => TRUE,
> > >   flush => FALSE,
> > >   rewrite => TRUE,
> > >   stripcr => FALSE,
> > >   forcecr => FALSE,
> > >   pass8bits => FALSE,
> > >   dropstatus => FALSE,
> > >   dropdelivered => FALSE,
> > >   mimedecode => FALSE,
> > >   idle => FALSE,
> > >   mda => 'None',
> > >   bsmtp => 'None',
> > >   lmtp => FALSE,
> > >   preconnect => 'None',
> > >   postconnect => 'None',
> > >   limit => 0,
> > >   warnings => 3600,
> > >   fetchlimit => 0,
> > >   batchlimit => 0,
> > >   expunge => 0,
> > >   properties => 'None',
> > >   smtphunt => [ qw(localhost) ],
> > >   fetchdomains => [],
> > >   smtpaddress => 'None',
> > >   smtpname => 'None',
> > >   antispam => '',
> > >   mailboxes => [ qw() ],
> > >      }
> > >      ,     {
> > >   remote => 'jan@klaverstijn.nl',
> > >   password => '****',
> > >   localnames => [ qw(root *) ],
> > >   fetchall => FALSE,
> > >   keep => TRUE,
> > >   flush => FALSE,
> > >   rewrite => TRUE,
> > >   stripcr => FALSE,
> > >   forcecr => FALSE,
> > >   pass8bits => FALSE,
> > >   dropstatus => FALSE,
> > >   dropdelivered => FALSE,
> > >   mimedecode => FALSE,
> > >   idle => FALSE,
> > >   mda => 'None',
> > >   bsmtp => 'None',
> > >   lmtp => FALSE,
> > >   preconnect => 'None',
> > >   postconnect => 'None',
> > >   limit => 0,
> > >   warnings => 3600,
> > >   fetchlimit => 0,
> > >   batchlimit => 0,
> > >   expunge => 0,
> > >   properties => 'None',
> > >   smtphunt => [ qw(localhost) ],
> > >   fetchdomains => [],
> > >   smtpaddress => 'None',
> > >   smtpname => 'None',
> > >   antispam => '',
> > >   mailboxes => [ qw() ],
> > >      }
> > >      ,     {
> > >   remote => 'niek@klaverstijn.nl',
> > >   password => '******',
> > >   localnames => [ qw(niek) ],
> > >   fetchall => FALSE,
> > >   keep => TRUE,
> > >   flush => FALSE,
> > >   rewrite => TRUE,
> > >   stripcr => FALSE,
> > >   forcecr => FALSE,
> > >   pass8bits => FALSE,
> > >   dropstatus => FALSE,
> > >   dropdelivered => FALSE,
> > >   mimedecode => FALSE,
> > >   idle => FALSE,
> > >   mda => 'None',
> > >   bsmtp => 'None',
> > >   lmtp => FALSE,
> > >   preconnect => 'None',
> > >   postconnect => 'None',
> > >   limit => 0,
> > >   warnings => 3600,
> > >   fetchlimit => 0,
> > >   batchlimit => 0,
> > >   expunge => 0,
> > >   properties => 'None',
> > >   smtphunt => [ qw(localhost) ],
> > >   fetchdomains => [],
> > >   smtpaddress => 'None',
> > >   smtpname => 'None',
> > >   antispam => '',
> > >   mailboxes => [ qw() ],
> > >      }
> > >      ,     {
> > >   remote => 'vince@klaverstijn.nl',
> > >   password => '*****',
> > >   localnames => [ qw(vince) ],
> > >   fetchall => FALSE,
> > >   keep => TRUE,
> > >   flush => FALSE,
> > >   rewrite => TRUE,
> > >   stripcr => FALSE,
> > >   forcecr => FALSE,
> > >   pass8bits => FALSE,
> > >   dropstatus => FALSE,
> > >   dropdelivered => FALSE,
> > >   mimedecode => FALSE,
> > >   idle => FALSE,
> > >   mda => 'None',
> > >   bsmtp => 'None',
> > >   lmtp => FALSE,
> > >   preconnect => 'None',
> > >   postconnect => 'None',
> > >   limit => 0,
> > >   warnings => 3600,
> > >   fetchlimit => 0,
> > >   batchlimit => 0,
> > >   expunge => 0,
> > >   properties => 'None',
> > >   smtphunt => [ qw(localhost) ],
> > >   fetchdomains => [],
> > >   smtpaddress => 'None',
> > >   smtpname => 'None',
> > >   antispam => '',
> > >   mailboxes => [ qw() ],
> > >      }
> > >      ,     {
> > >   remote => 'cas@klaverstijn.nl',
> > >   password => '******',
> > >   localnames => [ qw(cas) ],
> > >   fetchall => FALSE,
> > >   keep => TRUE,
> > >   flush => FALSE,
> > >   rewrite => TRUE,
> > >   stripcr => FALSE,
> > >   forcecr => FALSE,
> > >   pass8bits => FALSE,
> > >   dropstatus => FALSE,
> > >   dropdelivered => FALSE,
> > >   mimedecode => FALSE,
> > >   idle => FALSE,
> > >   mda => 'None',
> > >   bsmtp => 'None',
> > >   lmtp => FALSE,
> > >   preconnect => 'None',
> > >   postconnect => 'None',
> > >   limit => 0,
> > >   warnings => 3600,
> > >   fetchlimit => 0,
> > >   batchlimit => 0,
> > >   expunge => 0,
> > >   properties => 'None',
> > >   smtphunt => [ qw(localhost) ],
> > >   fetchdomains => [],
> > >   smtpaddress => 'None',
> > >   smtpname => 'None',
> > >   antispam => '',
> > >   mailboxes => [ qw() ],
> > >      }
> > >      , ]
> > >     }
> > > ]
> > > );# End of initializer
> > >
> > >
> > >
> > >
> > > "Domizio Demichelis" <dd@4pro.net> wrote in message
> > > news:ao47ek$ir8tu$1@ID-159100.news.dfncis.de...
> > > > > The solution with a package and :: is obscure to me: if I declare
> > > "package
> > > > > conf;" in file_a.pl that I require in file_b.pl and refer to my
data
> > > > > structure as
> > > > >                       for my $where ( @{
> > $conf::fetchmailrc{servers} } )
> > > {
> > > > > it still won' work.
> > > >
> > > > I think it could be a problem in the structure itself. Please could
> you
> > > post
> > > > the entire definition of the structure, so we can understand better
> the
> > > > problem?
> > > >
> > > > Thank you
> > > >
> > > > --
> > > > -.. --- -- .. --.. .. ---
> > > > -.. . -- .. -.-. .... . .-.. .. ...
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
> >
> >
>
>




------------------------------

Date: Thu, 10 Oct 2002 19:23:08 +0200
From: "Jan Klaverstijn" <jan@klaverstijn.nl>
Subject: Re: Problem with require() versus in-line code
Message-Id: <3da5b795$0$11214$1b62eedf@news.euronet.nl>

I get "conf.pl syntax OK". Probably a copy-and-paste error.

Jan.


"Domizio Demichelis" <dd@4pro.net> schreef in bericht
news:ao4b40$jdbc9$1@ID-159100.news.dfncis.de...
> please, check the syntax of the file, becaus it doesn't compile and
returns
> the error "Bad name after None' at conf.pl line 91"... dow it return the
> same error when you check the syntax?
>
> perl -cw conf.pl
>
> --
> -.. --- -- .. --.. .. ---
> -.. . -- .. -.-. .... . .-.. .. ...
>
>
> "Jan Klaverstijn" <jan@klaverstijn.nl> wrote in message
> news:3da5abb3$0$11199$1b62eedf@news.euronet.nl...
> > Domizio,
> >
> > Do you refer to the line
> >
> >   antispam => '',
> >
> > ?
> >
> > These are two single quotes.
> >
> > Otherwise, could you give me some context so I can spot the problem?
> >
> > I removed these lines and still no luck.
> >
> > Jan.
> >
> >
> > "Domizio Demichelis" <dd@4pro.net> wrote in message
> > news:ao49ct$j241j$1@ID-159100.news.dfncis.de...
> > > Bad name after None' at conf.pl line 91.
> > >
> > > please check the syntax of the file...
> > >
> > > then you can refer to %fetchmailrc both in the conf.pl and in the
> test.pl
> > as
> > > %::fetchmailrc  or $::fetchmailrc{key} and it will be ok under strict.
> > >
> > > try and let us know.
> > >
> > > dd
> > > --
> > > -.. --- -- .. --.. .. ---
> > > -.. . -- .. -.-. .... . .-.. .. ...
> > >
> > >
> > > "Jan Klaverstijn" <jan@klaverstijn.nl> wrote in message
> > > news:3da5a3cd$0$11202$1b62eedf@news.euronet.nl...
> > > > Shure. here it is. It's a bit long but hey, ..
> > > >
> > > > Thanks for being so on top of this.
> > > >
> > > > This is my current test.pl, the one that gets executed:
> > > >
> > > > #!/usr/bin/perl -w
> > > > use strict;
> > > > require "conf.pl";
> > > > # Traversing the tree
> > > > for my $where ( @{ $fetchmailrc{servers} } ) {
> > > >    print ("Server: $where->{pollname}\n");
> > > >    for my $who ( @{ $where->{users} } ) {
> > > >       print ("\tuser=$who->{remote} password=$who->{password}\n");
> > > >    }
> > > > }
> > > >
> > > > This is my "include file", actually called conf.pl:
> > > >
> > > > use strict;
> > > > use constant TRUE => 1;
> > > > use constant FALSE => 0;
> > > > my $os_type = 'linux';
> > > > my @feature_options = ('pop3','imap','etrn','odmr',);
> > > > # Start of configuration initializer
> > > > my %fetchmailrc = (
> > > >     poll_interval => 300,
> > > >     logfile => 'None',
> > > >     idfile => '/root/.fetchids',
> > > >     postmaster => 'postmaster',
> > > >     bouncemail => TRUE,
> > > >     spambounce => FALSE,
> > > >     properties => 'None',
> > > >     invisible => FALSE,
> > > >     showdots => FALSE,
> > > >     syslog => TRUE,
> > > >     # List of server entries begins here
> > > >     servers => [    # Entry for site `pop.euronet.nl' begins:
> > > >     {
> > > >  pollname => 'pop.euronet.nl',
> > > >  active => TRUE,
> > > >  via => 'None',
> > > >  protocol => 'POP3',
> > > >  port => 0,
> > > >  timeout => 300,
> > > >  interval => 0,
> > > >  envelope => 'Received',
> > > >  envskip => 1,
> > > >  qvirtual => 'None',
> > > >  auth => 'any',
> > > >  dns => FALSE,
> > > >  uidl => TRUE,
> > > >  aka => [ qw(euronet.nl euro.net neptune.euro.net) ],
> > > >  localdomains => [ qw(klaverstijn.nl) ],
> > > >  interface => 'None',
> > > >  monitor => 'None',
> > > >  plugin => 'None',
> > > >  plugout => 'None',
> > > >  principal => 'None',
> > > >  tracepolls => FALSE,
> > > >  users => [
> > > >      {
> > > >   remote => 'arkldesign@klaverstijn.nl',
> > > >   password => '*****',
> > > >   localnames => [ qw(arkldesign) ],
> > > >   fetchall => FALSE,
> > > >   keep => TRUE,
> > > >   flush => FALSE,
> > > >   rewrite => TRUE,
> > > >   stripcr => FALSE,
> > > >   forcecr => FALSE,
> > > >   pass8bits => FALSE,
> > > >   dropstatus => FALSE,
> > > >   dropdelivered => FALSE,
> > > >   mimedecode => FALSE,
> > > >   idle => FALSE,
> > > >   mda => 'None',
> > > >   bsmtp => 'None',
> > > >   lmtp => FALSE,
> > > >   preconnect => '/usr/local/bin/mailfilter',
> > > >   postconnect => 'None',
> > > >   limit => 0,
> > > >   warnings => 3600,
> > > >   fetchlimit => 0,
> > > >   batchlimit => 0,
> > > >   expunge => 0,
> > > >   properties => 'None',
> > > >   smtphunt => [ qw(localhost) ],
> > > >   fetchdomains => [],
> > > >   smtpaddress => 'None',
> > > >   smtpname => 'None',
> > > >   antispam => '',
> > > >   mailboxes => [ qw() ],
> > > >      }
> > > >      ,     {
> > > >   remote => 'karin.van.elck@klaverstijn.nl',
> > > >   password => '*******,
> > > >   localnames => [ qw(karin) ],
> > > >   fetchall => FALSE,
> > > >   keep => TRUE,
> > > >   flush => FALSE,
> > > >   rewrite => TRUE,
> > > >   stripcr => FALSE,
> > > >   forcecr => FALSE,
> > > >   pass8bits => FALSE,
> > > >   dropstatus => FALSE,
> > > >   dropdelivered => FALSE,
> > > >   mimedecode => FALSE,
> > > >   idle => FALSE,
> > > >   mda => 'None',
> > > >   bsmtp => 'None',
> > > >   lmtp => FALSE,
> > > >   preconnect => 'None',
> > > >   postconnect => 'None',
> > > >   limit => 0,
> > > >   warnings => 3600,
> > > >   fetchlimit => 0,
> > > >   batchlimit => 0,
> > > >   expunge => 0,
> > > >   properties => 'None',
> > > >   smtphunt => [ qw(localhost) ],
> > > >   fetchdomains => [],
> > > >   smtpaddress => 'None',
> > > >   smtpname => 'None',
> > > >   antispam => '',
> > > >   mailboxes => [ qw() ],
> > > >      }
> > > >      ,     {
> > > >   remote => 'karin@klaverstijn.nl',
> > > >   password => '******',
> > > >   localnames => [ qw(karin) ],
> > > >   fetchall => FALSE,
> > > >   keep => TRUE,
> > > >   flush => FALSE,
> > > >   rewrite => TRUE,
> > > >   stripcr => FALSE,
> > > >   forcecr => FALSE,
> > > >   pass8bits => FALSE,
> > > >   dropstatus => FALSE,
> > > >   dropdelivered => FALSE,
> > > >   mimedecode => FALSE,
> > > >   idle => FALSE,
> > > >   mda => 'None',
> > > >   bsmtp => 'None',
> > > >   lmtp => FALSE,
> > > >   preconnect => 'None',
> > > >   postconnect => 'None',
> > > >   limit => 0,
> > > >   warnings => 3600,
> > > >   fetchlimit => 0,
> > > >   batchlimit => 0,
> > > >   expunge => 0,
> > > >   properties => 'None',
> > > >   smtphunt => [ qw(localhost) ],
> > > >   fetchdomains => [],
> > > >   smtpaddress => 'None',
> > > >   smtpname => 'None',
> > > >   antispam => '',
> > > >   mailboxes => [ qw() ],
> > > >      }
> > > >      ,     {
> > > >   remote => 'arjen@klaverstijn.nl',
> > > >   password => '*****',
> > > >   localnames => [ qw(arjen) ],
> > > >   fetchall => FALSE,
> > > >   keep => TRUE,
> > > >   flush => FALSE,
> > > >   rewrite => TRUE,
> > > >   stripcr => FALSE,
> > > >   forcecr => FALSE,
> > > >   pass8bits => FALSE,
> > > >   dropstatus => FALSE,
> > > >   dropdelivered => FALSE,
> > > >   mimedecode => FALSE,
> > > >   idle => FALSE,
> > > >   mda => 'None',
> > > >   bsmtp => 'None',
> > > >   lmtp => FALSE,
> > > >   preconnect => 'None',
> > > >   postconnect => 'None',
> > > >   limit => 0,
> > > >   warnings => 3600,
> > > >   fetchlimit => 0,
> > > >   batchlimit => 0,
> > > >   expunge => 0,
> > > >   properties => 'None',
> > > >   smtphunt => [ qw(localhost) ],
> > > >   fetchdomains => [],
> > > >   smtpaddress => 'None',
> > > >   smtpname => 'None',
> > > >   antispam => '',
> > > >   mailboxes => [ qw() ],
> > > >      }
> > > >      ,     {
> > > >   remote => 'jan@klaverstijn.nl',
> > > >   password => '****',
> > > >   localnames => [ qw(root *) ],
> > > >   fetchall => FALSE,
> > > >   keep => TRUE,
> > > >   flush => FALSE,
> > > >   rewrite => TRUE,
> > > >   stripcr => FALSE,
> > > >   forcecr => FALSE,
> > > >   pass8bits => FALSE,
> > > >   dropstatus => FALSE,
> > > >   dropdelivered => FALSE,
> > > >   mimedecode => FALSE,
> > > >   idle => FALSE,
> > > >   mda => 'None',
> > > >   bsmtp => 'None',
> > > >   lmtp => FALSE,
> > > >   preconnect => 'None',
> > > >   postconnect => 'None',
> > > >   limit => 0,
> > > >   warnings => 3600,
> > > >   fetchlimit => 0,
> > > >   batchlimit => 0,
> > > >   expunge => 0,
> > > >   properties => 'None',
> > > >   smtphunt => [ qw(localhost) ],
> > > >   fetchdomains => [],
> > > >   smtpaddress => 'None',
> > > >   smtpname => 'None',
> > > >   antispam => '',
> > > >   mailboxes => [ qw() ],
> > > >      }
> > > >      ,     {
> > > >   remote => 'niek@klaverstijn.nl',
> > > >   password => '******',
> > > >   localnames => [ qw(niek) ],
> > > >   fetchall => FALSE,
> > > >   keep => TRUE,
> > > >   flush => FALSE,
> > > >   rewrite => TRUE,
> > > >   stripcr => FALSE,
> > > >   forcecr => FALSE,
> > > >   pass8bits => FALSE,
> > > >   dropstatus => FALSE,
> > > >   dropdelivered => FALSE,
> > > >   mimedecode => FALSE,
> > > >   idle => FALSE,
> > > >   mda => 'None',
> > > >   bsmtp => 'None',
> > > >   lmtp => FALSE,
> > > >   preconnect => 'None',
> > > >   postconnect => 'None',
> > > >   limit => 0,
> > > >   warnings => 3600,
> > > >   fetchlimit => 0,
> > > >   batchlimit => 0,
> > > >   expunge => 0,
> > > >   properties => 'None',
> > > >   smtphunt => [ qw(localhost) ],
> > > >   fetchdomains => [],
> > > >   smtpaddress => 'None',
> > > >   smtpname => 'None',
> > > >   antispam => '',
> > > >   mailboxes => [ qw() ],
> > > >      }
> > > >      ,     {
> > > >   remote => 'vince@klaverstijn.nl',
> > > >   password => '*****',
> > > >   localnames => [ qw(vince) ],
> > > >   fetchall => FALSE,
> > > >   keep => TRUE,
> > > >   flush => FALSE,
> > > >   rewrite => TRUE,
> > > >   stripcr => FALSE,
> > > >   forcecr => FALSE,
> > > >   pass8bits => FALSE,
> > > >   dropstatus => FALSE,
> > > >   dropdelivered => FALSE,
> > > >   mimedecode => FALSE,
> > > >   idle => FALSE,
> > > >   mda => 'None',
> > > >   bsmtp => 'None',
> > > >   lmtp => FALSE,
> > > >   preconnect => 'None',
> > > >   postconnect => 'None',
> > > >   limit => 0,
> > > >   warnings => 3600,
> > > >   fetchlimit => 0,
> > > >   batchlimit => 0,
> > > >   expunge => 0,
> > > >   properties => 'None',
> > > >   smtphunt => [ qw(localhost) ],
> > > >   fetchdomains => [],
> > > >   smtpaddress => 'None',
> > > >   smtpname => 'None',
> > > >   antispam => '',
> > > >   mailboxes => [ qw() ],
> > > >      }
> > > >      ,     {
> > > >   remote => 'cas@klaverstijn.nl',
> > > >   password => '******',
> > > >   localnames => [ qw(cas) ],
> > > >   fetchall => FALSE,
> > > >   keep => TRUE,
> > > >   flush => FALSE,
> > > >   rewrite => TRUE,
> > > >   stripcr => FALSE,
> > > >   forcecr => FALSE,
> > > >   pass8bits => FALSE,
> > > >   dropstatus => FALSE,
> > > >   dropdelivered => FALSE,
> > > >   mimedecode => FALSE,
> > > >   idle => FALSE,
> > > >   mda => 'None',
> > > >   bsmtp => 'None',
> > > >   lmtp => FALSE,
> > > >   preconnect => 'None',
> > > >   postconnect => 'None',
> > > >   limit => 0,
> > > >   warnings => 3600,
> > > >   fetchlimit => 0,
> > > >   batchlimit => 0,
> > > >   expunge => 0,
> > > >   properties => 'None',
> > > >   smtphunt => [ qw(localhost) ],
> > > >   fetchdomains => [],
> > > >   smtpaddress => 'None',
> > > >   smtpname => 'None',
> > > >   antispam => '',
> > > >   mailboxes => [ qw() ],
> > > >      }
> > > >      , ]
> > > >     }
> > > > ]
> > > > );# End of initializer
> > > >
> > > >
> > > >
> > > >
> > > > "Domizio Demichelis" <dd@4pro.net> wrote in message
> > > > news:ao47ek$ir8tu$1@ID-159100.news.dfncis.de...
> > > > > > The solution with a package and :: is obscure to me: if I
declare
> > > > "package
> > > > > > conf;" in file_a.pl that I require in file_b.pl and refer to my
> data
> > > > > > structure as
> > > > > >                       for my $where ( @{
> > > $conf::fetchmailrc{servers} } )
> > > > {
> > > > > > it still won' work.
> > > > >
> > > > > I think it could be a problem in the structure itself. Please
could
> > you
> > > > post
> > > > > the entire definition of the structure, so we can understand
better
> > the
> > > > > problem?
> > > > >
> > > > > Thank you
> > > > >
> > > > > --
> > > > > -.. --- -- .. --.. .. ---
> > > > > -.. . -- .. -.-. .... . .-.. .. ...
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> >
>
>




------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 3948
***************************************


home help back first fref pref prev next nref lref last post