[Zope-Perl] Re: Python pyperl

anand d andzonline at rediffmail.com
Sun Apr 2 16:42:22 EDT 2006


hi,
Thankz for the solution.We went through the example in /t and solved the problem.We no longer face problem while importing and using standard perl modules.However we r not able to import and use user-defined perl module. We use,

perl.require('User-defined.pm file')
perl.call('Userdefined::function','args')

However it gives an error of
perl.PerlError: Undefined subroutine &main::'function' called.


Could please tell where pyperl searches for the .pm file by default.i.e. in which directory should we copy our User-defined perl file so that pyperl finds  functions written in the .pm file


Anand
GNOWSYS TEAM










On Fri, 31 Mar 2006 Felix Schwarz wrote :
>
>anand  d schrieb:
> >>>> perl.require("POSIX")
> > 1
> >>>> x=perl.call('import') # import is a function in POSIX.pm
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in ?
> > perl.PerlError: Undefined subroutine &main::import called.
>
>[fs at workstation pyperl-1.0.1c]$ perldoc POSIX  | grep import
>[fs at workstation pyperl-1.0.1c]$
>
>I don't see a POSIX::import function in perldoc. Please show us your
>Perl code you try to write. Is it something like:
>
>----------------
>require POSIX;
>import POSIX;
>print clock(),"\n";
>----------------
>
>This can be achieved by:
>import perl
>perl.require("POSIX")
>perl.eval('import POSIX; print clock(),"\n";')
>
>If you find bugs, please provide a testcase for it (see the 't'
>directory for examples).
>
>--
>Felix
>
>_______________________________________________
>Zope-perl maillist  -  Zope-perl at zope.org
>http://mail.zope.org/mailman/listinfo/zope-perl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope-perl/attachments/20060402/a3e6cb71/attachment.htm


More information about the Zope-perl mailing list