[Zope-Perl] PerlError: constant item trapped by operation mask at (eval 12) line 1.

Andy McKay andym@ActiveState.com
Wed, 27 Jun 2001 14:05:22 -0700


Hmm. Heres a patch for a bug that occurs on editing. Im dont remember
getting the same error message though:

/lib/perl/Zope.pm

--- d:\Zope.pm  Sat Feb 24 00:21:02 2001
+++ l:\lib\perl\Zope.pm Fri Apr 27 12:19:51 2001
@@ -41,7 +41,7 @@
        my $mtime = (stat $f)[9];
        if ($mtime > ($mod_stat{$f} || $^T)) {
            delete $INC{$file};
-           require_ext($mod);
+           require_ext($mod, $instance_home);
        }
        $mod_stat{$f} = $mtime;
     }

Cheers.
--
  Andy McKay.


----- Original Message -----
From: "Maarten Slaets" <maarten.slaets@neolabs.be>
To: <zope-perl@zope.org>
Sent: Thursday, June 21, 2001 2:22 AM
Subject: [Zope-Perl] PerlError: constant item trapped by operation mask at
(eval 12) line 1.


> Hi,
>
> I'm getting an error while testing a perl script. At (seamingly) random
> edit's I get the traceback seen below. Only thing I can do to continue
> editing is restart my zope.
>
> Perl Script:
> id: perlmenu
> arg: self
> code:
> my @res;
> search($self);
>
>
> sub search {
>   my @array = ('Folder', 'DTML Document');
>   for ($_[0]->objectValues(\@array)) {
>     push(@res, $_->getId());
>   }
> }
>
> return join("\n", @res);
>
>
> Now if I start modifying the code, at some point I get a traceback like
> this:
>
>
>
> Traceback (innermost last):
>   File /home/zope/Zope-2.3.2/lib/python/ZPublisher/Publish.py, line 223,
> in publish_module
>   File /home/zope/Zope-2.3.2/lib/python/ZPublisher/Publish.py, line 187,
> in publish
>   File /home/zope/Zope-2.3.2/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
>     (Object: perlmenu)
>   File /home/zope/Zope-2.3.2/lib/python/ZPublisher/Publish.py, line 171,
> in publish
>   File /home/zope/Zope-2.3.2/lib/python/ZPublisher/mapply.py, line 160,
> in mapply
>     (Object: manage_edit)
>   File /home/zope/Zope-2.3.2/lib/python/ZPublisher/Publish.py, line 112,
> in call_object
>     (Object: manage_edit)
>   File /home/zope/Zope-2.3.2/lib/python/Products/PerlMethod/__init__.py,
> line 96, in manage_edit
>     (Object: perlmenu)
>   File /home/zope/Zope-2.3.2/lib/python/Products/PerlMethod/__init__.py,
> line 155, in recompile
>     (Object: perlmenu)
> PerlError: constant item trapped by operation mask at (eval 11) line 1.
>
>
> If I add another perl script:
> id: somethingelse
> arg:
> code:
> 1;
>
> I get the same error:
>
> Traceback (innermost last):
>   File /home/zope/Zope-2.3.2/lib/python/ZPublisher/Publish.py, line 223,
> in publish_module
>   File /home/zope/Zope-2.3.2/lib/python/ZPublisher/Publish.py, line 187,
> in publish
>   File /home/zope/Zope-2.3.2/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
>   File /home/zope/Zope-2.3.2/lib/python/ZPublisher/Publish.py, line 171,
> in publish
>   File /home/zope/Zope-2.3.2/lib/python/ZPublisher/mapply.py, line 160,
> in mapply
>     (Object: manage_addPerlMethod)
>   File /home/zope/Zope-2.3.2/lib/python/ZPublisher/Publish.py, line 112,
> in call_object
>     (Object: manage_addPerlMethod)
>   File /home/zope/Zope-2.3.2/lib/python/Products/PerlMethod/__init__.py,
> line 224, in manage_addPerlMethod
>   File /home/zope/Zope-2.3.2/lib/python/Products/PerlMethod/__init__.py,
> line 83, in __init__
>     (Object: testfdsfsdf)
>   File /home/zope/Zope-2.3.2/lib/python/Products/PerlMethod/__init__.py,
> line 96, in manage_edit
>     (Object: testfdsfsdf)
>   File /home/zope/Zope-2.3.2/lib/python/Products/PerlMethod/__init__.py,
> line 155, in recompile
>     (Object: testfdsfsdf)
> PerlError: constant item trapped by operation mask at (eval 12) line 1.
>
> I'm using:
> Zope Version
>                 Zope 2.3.2 (source release, python 1.5.2, linux2)
>  Python Version
>                 2.1 (#2, May 1 2001, 14:50:43) [GCC 2.95.2 20000220
> (Debian GNU/Linux)]
>  System Platform
>                 linux2
>  Process Id
>                 1352 (1026)
>  Running For
>                 31 min 16 sec
>
> and
>
> zoperl-1.0.beta5
> pyperl-1.0.1
>
> I don't have much time to look at this further for now, but if any of
> you get the same error, please let me know.
>
> --
> Maarten Slaets
> Contact: http://www.neolabs.be/vcard/MaartenSlaets.vcf
>
> _______________________________________________
> Zope-perl maillist  -  Zope-perl@zope.org
> http://lists.zope.org/mailman/listinfo/zope-perl
>