Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jan 09, 2008 6:12 pm   

[2.18] Scripting Language PerlScript not supported?
 
Maybe it's the script, but I don't know. I have ActivePerl installed on this computer, and CMUD recognizes it (how else would it provide the PerlScript option in the dropdown menu?), but whenever I try to run the following script, it returns:

"Scripting Language PerlScript not supported"

Either that's misleading, or CMUD doesn't support Perl anymore. Not sure which is which. This is the script I'm running (which works fine if I run it from the Windows Command Line):

Code:
#!/usr/local/bin/perl

use warnings;
use WWW::Mechanize;

my $mech = WWW::Mechanize->new();
my $url = "http://www.topmudsites.com/cgi-bin/topmuds/rankem.cgi?id=Sirene";

$mech->get( $url );

$mech->follow_link( n => 1 );

print "Voted!";


I place all that in an alias, and it doesn't work. Perhaps someone can give me some pointers on how to make it work if it's something I'm doing wrong. :P

Charneus
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Wed Jan 09, 2008 7:11 pm   
 
I'm pretty sure you don't want #!/usr/local/bin/perl because that's only used to auto-load the interpreter when you run the script directly (on a *NIX system).

I'd recommend you start with the simple "Hello, World!" script first, and if that won't execute, then you know something's up.

Side note: if the Mechanize module doesn't handle cookies automatically, your auto-voter probably won't be counted among the votes. Whyte's voter apparently doesn't track properly for a similar reason.
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Wed Jan 09, 2008 7:54 pm   
 
The script ran fine for me Charneus I'm using ActiveState 5.8.8 I downloaded and installed the Mechanize module.
added your script as a function changing only the print "Voted!" to return "Voted!"
And echoed the function, everything worked out.
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jan 09, 2008 8:03 pm   
 
Then I don't know what's going on in my system. I can't even get a simple "print "Hello world!";" to work. I know I have Perl installed. And it's the lastest version of ActiveState. And I know the scripts work otherwise. But after uninstalling and reinstalling CMUD, I still can't get it to work. It still returns the same error: Scripting language PerlScript not supported.

Then I'll try to run it again (just for kicks) and nothing happens. No error message, no success message, nothing.

And whether I close CMUD after running it a second time or just after the first time, it comes up with a "COM servers still active" question. I click "Yes" to go ahead and shut it down, then it returns "Invalid pointer" CMUD error. So I sent the bug report, but I'm just utterly confused why it's not working on my system. Surely it's not because of my OS being WindowsXP...

Charneus
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed Jan 09, 2008 8:24 pm   
 
Bear in mind that "print "Hello World";" won't actually do anything even if PerlScript is working, since print isn't linked to the MUD output screen like it has been with Lua.

Have you tried reinstalling PerlScript? It seems more likely that that's the source of the error.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Wed Jan 09, 2008 9:09 pm   
 
I'll try reinstalling ActivePerl again. It was just reinstalled last night, too. And while "print "Hello World";" won't actually do anything, it still gives the error message. Let me try one more time with installing it.

Charneus
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net