473,397 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

PerlException: [perl] eval error

12
Hi,
I'm using perl modules in php via perl interpreter. I don't no how to include modules. I tried the following code,

Expand|Select|Wrap|Line Numbers
  1. <?php
  2. echo "hello";
  3. $perl=new Perl();
  4.  
  5. $perl->eval('
  6. package Kernel::System::CustomerUser;
  7.  
  8.         use Kernel::Config;
  9.         use Kernel::System::Encode;
  10.         use Kernel::System::Log;
  11.         use Kernel::System::Main;
  12.         use Kernel::System::DB;
  13.         use Kernel::System::CustomerUser;
  14.  
  15.         my $ConfigObject = Kernel::Config->new();
  16.         my $EncodeObject = Kernel::System::Encode->new(
  17.             ConfigObject => $ConfigObject,
  18.         );
  19.         my $LogObject = Kernel::System::Log->new(
  20.             ConfigObject => $ConfigObject,
  21.             EncodeObject => $EncodeObject,
  22.         );
  23.         my $MainObject = Kernel::System::Main->new(
  24.             ConfigObject => $ConfigObject,
  25.             EncodeObject => $EncodeObject,
  26.             LogObject    => $LogObject,
  27.         );
  28.         my $DBObject = Kernel::System::DB->new(
  29.             ConfigObject => $ConfigObject,
  30.             EncodeObject => $EncodeObject,
  31.             LogObject    => $LogObject,
  32.             MainObject   => $MainObject,
  33.         );
  34.         my $CustomerUserObject = Kernel::System::CustomerUser->new(
  35.             ConfigObject => $ConfigObject,
  36.             LogObject    => $LogObject,
  37.             DBObject     => $DBObject,
  38.             MainObject   => $MainObject,
  39.             EncodeObject => $EncodeObject,
  40.         );
  41.  my %List = $CustomerUserObject->CustomerSourceList();
  42. 1;
  43. '
  44. );
  45.  
  46. //print $@->getErrorMessage();  
  47.  
  48.  
  49. $p=new Perl("CustomerUser");
  50. var_dump($p);
  51. print "hello";
  52. //$p1=new Perl("CustomerUser", '1');
  53. //var_dump($p1);
  54. ?>

but got this error,

PerlException: [perl] eval error: Can't locate Kernel/Config.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at (eval 1) line 4. BEGIN failed--compilation aborted (in cleanup) Can't locate Kernel/Config.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at (eval 1) line 4. BEGIN failed--compilation aborted at (eval 1) line 4. in /var/www/mohan/adduseraction.php on line 44
Call Stack
# Time Memory Function Location
1 0.0002 56816 {main}( ) ../adduseraction.php:0
2 0.0002 58576 Perl->eval( ) ../adduseraction.php:44
May 14 '10 #1
1 2154
RonB
589 Expert Mod 512MB
Kernel::Config is either not installed, or was not installed correctly.

Have you tried installing the module?
May 14 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Michelle Keys | last post by:
Subject: DataBinder.Eval Error! Server Error in '/MSPOS' Application. ------------------------------------------------------------------------ -------- DataBinder.Eval:...
2
by: Lam | last post by:
hi I wrote a aspx page in c#. It execute the query to SQL 2000 database and return a DataTable table, bind it to the DataGrid and display on the screen. The page refresh every 10 seconds. it has...
0
by: Patrick Hatcher | last post by:
Anyone using perl scripts to import data with Pg 7.4.X? Since updating to Pg 7.4.2 from 7.3.6 , I no longer can tell where my import error occurs because the error row information now resides in...
1
by: tom.sebastian | last post by:
Hi, Could anyone help me with this dilemma. I have written a simple script and I receive an error "PREMATURE END OF SCRIPT" while executing it through the browser. When I click on the same...
3
by: STAGED | last post by:
NEWBIE ALERT... I have a script that renames filenames. It has some basic math operations associated with it too. The script ***runs perfectly*** in its intended task and all variables have...
14
by: ray | last post by:
I am calling a function using eval. It runs in a form module, in response to a button OnClick. strCall = "Forms!frmSchedule.eval" & strSName(0) & "()" On Error Resume Next n = Eval(strCall) ...
0
by: coderpunk | last post by:
The system has multiple virtuals on it, one of them has some broken code that is being run through eval() at a fairly regular rate, the logs show a PHP Parse Error in the eval()'d code. A...
1
by: budhartel | last post by:
Here is a sampel of the JSON text being returned from an httpRequest {"Results": {"pubNeighborhhods": {"Rows": } } } the above is returned as one long string with no line...
4
by: billb | last post by:
I installed a perl extension for PHP to use some perl inside my php primarily because I have perl working with oracle and not php and oracle. So I want to use my old perl scripts, and use the...
1
by: crawfordr | last post by:
Hello, I have created a perl script that connects to a specific socket (Ip address/port) using protocall of TCP. It is the server socket script. There is also coding to manage multiple handles by...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.