Re: Running Inline::Python in a CGI script

[email protected] (Chris Nighswonger)
Newsgroups perl.inline
Message-ID <CAP3yOonQyKUKVSThCGSbQbhXjnKWoEc22MeTsFbs+LkMmm4QGw@mail.gmail.com>
On Tue, Mar 12, 2013 at 9:25 AM, Chris Nighswonger <
[email protected]> wrote:

> I double checked and .Inline and friends have correct perms. Clearing
> everything below .Inline shows that the module is rebuilt as expected on
> the next call to the CGI.
>
> I've tried BUILD_NOISY and the other Inline switches which would seem to
> be helpful for debug, but with little success at obtaining useful
> information. I'm guessing some of that may be largely dependent upon how
> the author of Inline::Python has implemented them.
>
> It seems there should be some way to convince inline::Python to fess up to
> any errors it is encountering along the way.
>

Perhaps I should mention this as well:

The CGI scripts executed by miniserv.pl via an eval of a code block which
sets up the environment and calls up the actual CGI via 'do.' See
https://github.com/webmin/webmin/blob/master/miniserv.pl#L2337 for the
exact code.

I suspected the forced package change on line 2339 might be causing some
scoping problems or some such, so I did this:

root@biblios:/usr/share/webmin/pykota (0.02_pre_alpha *)# perl -e 'package
pyktoa; do "PyKotaConfig.cgi"; die $@ if ($@);'

And get this:

Can't locate object method "new" via package "PykotaConfig" (perhaps you
forgot to load "PykotaConfig"?) at PyKotaConfig.cgi line 33.

This is exactly the same error I receive when running the same script as
CGI. BUT... commenting out line 2339 in miniserve.pl did not fix the
problem. So I suspect there is more to it than that.

Kind Regards,
Chris
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.