Re: [webmin-devel] Using Inline in a Webmin module
"Jamie Cameron" <[email protected]> Thu, 07 Mar 2013 10:45:33 -0800 (PST)
| Newsgroups | gmane.comp.web.webmin.devel |
|---|---|
| Message-ID | <[email protected]> |
On 07/Mar/2013 09:57 Chris Nighswonger <[email protected]> wrote .. > Hi all, > > I'm attempting to use Inline::Python in a webmin module. > > I can execute the script from the command line and things go just fine: I > am able to bind to the Python lib and create objects based on Python > classes, etc. > > Once I add code to the script to load up the required webmin prereqs, the > problems start. I end up with an error like this: > > "Can't locate object method "new" via package "FooBar" (perhaps you forgot > to load "FooBar"?)" > > Where "FooBar" is the Perl name for a Python class "foobar". > > For some reason it looks like maybe @INC is not correct the second time > around, but I cannot confirm that. > > Could it be that Inline compiles the library in one location, but somehow > there is a change relative to that location once inside of the webmin > environment? > > Any thoughts on what's going on? It could be that Webmin is modifying @INC, such as when you call code in another Webmin module. You mentioned that this only happens when you call the webmin pre-reqs .. which specific line of code triggers the problem? - Jamie ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev - Forwarded by the Webmin development list at [email protected] To remove yourself from this list, go to http://lists.sourceforge.net/lists/listinfo/webadmin-devel