LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-31-2003, 03:11 PM   #1
nda211
LQ Newbie
 
Registered: Jan 2003
Posts: 4

Rep: Reputation: 0
perl plugin not working on some linux machines


hi

i have created a plugin in perl and am trying to run it but am not able to on some of my machies. The code seems to be working on some and not on others. So there is no uniformity that has been observed.

The main plugin is supposed to get informations from other perl plugins and i am using the -- run and -- info switches to get that information.

can you let me know if this is due to the following code....

open FILE, "$plugindir/$plugin.plugin --info |" || die "ERROR: Couldn't run plug-in \"$plugin\"\n";
INFOLOOP: while ($line = <FILE>)

Can You kindly suggest me the way either to rectify this problem or
suggest a new way of implementing the same thing.

thanks
Nitin
 
Old 02-01-2003, 03:39 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Could you write more about your problem? Are you sure the $plugindir is set correctly in all cases?
 
Old 02-02-2003, 12:57 PM   #3
nda211
LQ Newbie
 
Registered: Jan 2003
Posts: 4

Original Poster
Rep: Reputation: 0
perl plugin not running on some linux machines

The code seems to be working on some and not on others.it is running fine on my
machine . it runs on my machine when I give "perl the_plugin_name" but not on some other linux machines.

the design is such that there is a main plugin called main.plugin which is supposed to execute other plugins(66 plugins in all.. lets call each of these 66 plugin as individual_plugin) tht are kept in a directory. to run the 66 plugins we are using -- run comand line option defined in each of the 66 plugins. also we are gathering system information which can be accessed using the -- info command line option defined in each plugin. the -- run and -- info are then used in the main.plugin to run the 66 plugins and display information about these 66 plugins.
now on all machines when i run "perl individual_plugin --run" it runs the individual
plugin. also when i use perl individual_plugin --info the plugin works fine, returning all the information required. but the problem is that on some machines we are not able to run the main.plugin.

We have identified two lines in the ferret code that do not
work.

The first one is

open FILE, "$plugindir/$plugin.plugin --info |"||die....
On line number 264 we use similar line trying to "run" the plugins using
"--run" and face the same problem there also.

If we remove "info switch" then we are able to open the plugins file but
if I use "--info" then we cant.

The motive of the developer was to pass the "info" switch to the plugin
called. If we open any plugin from the plugins directory then in the
GetOption "info" and "run" can be seen. But the thing is that we are not
able to pass the value to those fields in the plugin thruh our main
code.

Can You kindly suggest me the way either to rectify this problem or
suggest a new way of implementing the same thing.

regards
Nitin
 
Old 02-03-2003, 03:11 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Have you tried to check WHY it sometimes fails? If I remember correctly you can use $! variable for it. It seems like a permission/other configuration problem rather than a code one...
 
Old 02-03-2003, 05:37 PM   #5
nda211
LQ Newbie
 
Registered: Jan 2003
Posts: 4

Original Poster
Rep: Reputation: 0
hi
we have not been able to figure out exactly why the plugins work on some machine and not on others. the code part looks fine as it is running on some machines. but we are stuck up as we do not know whats wrong with the configuration tht needs to be changed in order to get it working on all the machines. we have also tried all combinations of permissions but it doesnt work.
thanks
 
Old 02-04-2003, 05:28 AM   #6
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Modify the line this way:
open FILE, "$plugindir/$plugin.plugin --info |" || die "ERROR: Couldn't run plug-in \"$plugin\" code: $!\n";
Then it will print not only your message, bt also the error code. Please try it and see it it's always the same error code, or it changes. And please post it...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting samba working with two linux machines mjm70 Mandriva 4 07-12-2005 05:00 PM
NIS: yppasswd not working on client machines ice_hockey Linux - Networking 1 06-07-2005 12:21 AM
Making Xchat perl plugin ivanatora Programming 1 04-14-2005 12:58 PM
PERL plugin for ECLIPSE!! Azzath Linux - Software 0 02-24-2005 07:42 PM
nslookup not working on client machines only nbarraud *BSD 3 11-25-2004 01:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration