vivia has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I just installed openwebmail (on a *very* old system) and I tried to run openwebmail-tool.pl --init . The output was this:
bash# /var/lib/httpd/cgi-bin/openwebmail/openwebmail-tool.pl --init "flock" is not defined in %Fcntl::EXPORT_TAGS at /usr/lib/perl5/Export +er.pm line 57 Exporter::export called at /usr/lib/perl5/Exporter.pm line 149 Exporter::import called at /var/lib/httpd/cgi-bin/openwebmail/ +openwebmail-tool.pl line 29 main::BEGIN called at /usr/lib/perl5/Fcntl.pm line 0 eval {...} called at /usr/lib/perl5/Fcntl.pm line 0 Can't continue after import errors at /var/lib/httpd/cgi-bin/openwebma +il/openwebmail-tool.pl line 29 BEGIN failed--compilation aborted at /var/lib/httpd/cgi-bin/openwebmai +l/openwebmail-tool.pl line 29.
That's an old system with thousands of users and it would be a real pain for me to install perl from the beginning. Is there an easier solution to this?
  • Comment on "flock" is not defined in %Fcntl::EXPORT_TAGS at /usr/lib/perl5/Exporter.pm
  • Download Code

Replies are listed 'Best First'.
Re: "flock" is not defined in %Fcntl::EXPORT_TAGS at /usr/lib/perl5/Exporter.pm
by zejames (Hermit) on Dec 02, 2004 at 15:36 UTC

    Are you sure you have perl 5.005 or above ? It is a requirement for OpenWebmail. If not, I'm not sure you'll achieve what you want ...


    --
    zejames
Re: "flock" is not defined in %Fcntl::EXPORT_TAGS at /usr/lib/perl5/Exporter.pm
by gellyfish (Monsignor) on Dec 02, 2004 at 15:39 UTC

    You are looking for :flock not flock in your use Fcntl qw(:flock)

    /J\

      I have Perl 5.6.0 . Line 29 of openwebmail-tool.pl reads:
      use Fcntl qw(:DEFAULT :flock);
      Any other ideas?
        Examine the code in your Fcntl.pm file. Mine contains:
        # Named groups of exports %EXPORT_TAGS = ( 'flock' => [qw(LOCK_SH LOCK_EX LOCK_NB LOCK_UN)], ...
        Possibly this tag was not defined in the version of Fcntl.pm that came with Perl 5.6.0. You could get around this various ways, such as by importing the listed symbols directly or by updating the Fcntl module.