Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Perl / May 2005



Tip: Looking for answers? Try searching our database.

Installing WebService::GoogleHack

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Lola Lee - 17 May 2005 20:42 GMT
Has anyone tried to install this?  I did, and followed instructions for
defining the paths and it wouldn't work.  Here's what I get:

 Please Enter the Entire Path to the wsdl File,
#  EG, /home/public/GoogleSearch.wsdl
/TsarskoeSelo/Library/WebServer/Documents/GoogleSearch.wdsl
#
# This is the path to the WSDL file:
/TsarskoeSelo/Library/WebServer/Documents/GoogleSearch.wdsl, Thanks
#
# Please Enter path to the directory in which the untarred GoogleHack
resides ,
#  EG, /home/username/WebService/GoogleHack/
~/cpan/Build/WebService/GoogleHack/
#
# This is the path to the Google Hack directory:
~/cpan/Build/WebService/GoogleHack/, Thanks
#
# Please Enter path to the directory in which the  Brill Tagger executable,
#  EG, /home/username/RULE_BASED_TAGGER_V1.14/Bin_and_Data/

#
# This is the path to the tagger executable: , Thanks
#
# Is the above information accurate y-yes, n-no
y

Illegal WSDL File Location -
/TsarskoeSelo/Library/WebServer/Documents/GoogleSearch.wdsl

# Looks like you planned 2 tests but only ran 1.
# Looks like your test died just after 1.
t/1....dubious

        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-2
        Failed 2/2 tests, 0.00% okay
Failed Test Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/1.t        255 65280     2    3 150.00%  1-2
Failed 1/1 test scripts, 0.00% okay. 2/2 subtests failed, 0.00% okay.
make[1]: *** [test_dynamic] Error 2
make: *** [test] Error 2
  /usr/bin/make test -- NOT OK
Running make install
  make test had returned bad status, won't install without force

I don't know what is Brill Tagger executible - the script didn't call
for this to be installed if it didn't exist so I went ahead and didn't
define a path for this.

Signature

Lola - mailto:lola@his.com
http://www.lolajl.net | Blog at http://www.lolajl.net/blog/
Terrorismus delendus est! (Terrorism must be destroyed utterly!)
I'm in Bowie, MD, USA, halfway between DC and Annapolis.

Morbus Iff - 17 May 2005 20:53 GMT
> /TsarskoeSelo/Library/WebServer/Documents/GoogleSearch.wdsl
>
> Illegal WSDL File Location -
> /TsarskoeSelo/Library/WebServer/Documents/GoogleSearch.wdsl

If "TsarskoeSelo" is your primary hard drive, the correct location is:

 /Library/WebServer/Documents/GoogleSearch.wdsl

If it is a secondary/mounted/network drive, you want:

 /Volumes/TsarskoeSelo/Library/WebServer/Documents/GoogleSearch.wdsl

Signature

Morbus Iff ( you are nothing without your robot car, NOTHING! )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
Spidering Hacks: http://amazon.com/exec/obidos/ASIN/0596005776/disobeycom
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus

Lola Lee - 17 May 2005 21:08 GMT
>  /Library/WebServer/Documents/GoogleSearch.wdsl

When I ran this again, it died with this message:

Illegal WSDL File Location - /Library/WebServer/Documents/GoogleSearch.wdsl

Next time, I left off GoogleSearch.wdsl and it died again, I got this:

Can't locate object method "new" via package "WebService::GoogleHack" at
t/1.t line 85, <STDIN> line 5.
# Looks like you planned 2 tests but only ran 1.
# Looks like your test died just after 1.
t/1....dubious

        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-2
        Failed 2/2 tests, 0.00% okay
Failed Test Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/1.t        255 65280     2    3 150.00%  1-2
Failed 1/1 test scripts, 0.00% okay. 2/2 subtests failed, 0.00% okay.
make[1]: *** [test_dynamic] Error 2
make: *** [test] Error 2
  /usr/bin/make test -- NOT OK
Running make install
  make test had returned bad status, won't install without force

I do have the file in the Documents folder.

Signature

Lola - mailto:lola@his.com
http://www.lolajl.net | Blog at http://www.lolajl.net/blog/
Terrorismus delendus est! (Terrorism must be destroyed utterly!)
I'm in Bowie, MD, USA, halfway between DC and Annapolis.

Wiggins d'Anconia - 17 May 2005 21:23 GMT
>>  /Library/WebServer/Documents/GoogleSearch.wdsl
>
> When I ran this again, it died with this message:
>
> Illegal WSDL File Location - /Library/WebServer/Documents/GoogleSearch.wdsl

The test is trying to open the file just to test for existence,
readability, etc. (not sure why Perl ops couldn't be used rather than
opening and then closing, yikes) but you might want to hack the file
t/1.t and add $! to the error message to see why it is failing. Could be
any number of reasons, I assume the file is readable by your user, etc.
but $! will tell us why it is failing.

http://danconia.org

> Next time, I left off GoogleSearch.wdsl and it died again, I got this:
>
[quoted text clipped - 18 lines]
>
> I do have the file in the Documents folder.
Lola Lee - 18 May 2005 11:15 GMT
> The test is trying to open the file just to test for existence,
> readability, etc. (not sure why Perl ops couldn't be used rather than
> opening and then closing, yikes) but you might want to hack the file
> t/1.t and add $! to the error message to see why it is failing. Could be
> any number of reasons, I assume the file is readable by your user, etc.
> but $! will tell us why it is failing.

Okay . . . I added $1 right after ln 85 and this is what I got:

# Compilation failed in require at (eval 1) line 2.
Scalar found where operator expected at t/1.t line 89, near "$!
#isa_ok($google,"GoogleHack");

$google"
        (Missing semicolon on previous line?)
syntax error at t/1.t line 89, near "$!
#isa_ok($google,"GoogleHack");

$google"
Execution of t/1.t aborted due to compilation errors.

Signature

Lola - mailto:lola@his.com
http://www.lolajl.net | Blog at http://www.lolajl.net/blog/
Terrorismus delendus est! (Terrorism must be destroyed utterly!)
I'm in Bowie, MD, USA, halfway between DC and Annapolis.

Morbus Iff - 18 May 2005 12:15 GMT
> Okay . . . I added $1 right after ln 85 and this is what I got:
> # Compilation failed in require at (eval 1) line 2.

Well, that's a normal old syntax error - you just put the $! in the
wrong place. Ignoring that, did you correct your typo, per my previous
message? http://www.nntp.perl.org/group/perl.macosx/8991

Signature

Morbus Iff ( omnia mutantur, nos et mutamur in illis. )
Technical: http://www.oreillynet.com/pub/au/779
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus

Lola Lee - 18 May 2005 13:53 GMT
> Well, that's a normal old syntax error - you just put the $! in the
> wrong place. Ignoring that, did you correct your typo, per my previous
> message? http://www.nntp.perl.org/group/perl.macosx/8991

Yeah, I did correct the typo and that error message is what I got after
running the process again.  In fact, I've copied all the relevant
settings into Stickies so that I don't make this mistake again.

Now, $! . . . what does this do?  I looked in perldebtut and it says
that "!" means, redo a previous command, but what is the purpose of "$"?
 And, where should I be putting this in, again?

Here's the IF statement from t.1:

if($ans eq 'y' || $ans eq "yes")
{

open(WSDL,"$wsdl") || die("\n\n\n\nIllegal WSDL File Location -
$wsdl\n\n\n\n");

close(WSDL) ;

my $google = new WebService::GoogleHack;

#isa_ok($google,"GoogleHack");

$google->init("$key","$wsdl");

$google->Search("duluth");

$correction= $google->phraseSpelling("dulut");

diag("\n".     "The Suggested spelling for dulut is $correction".
     "\n");

is($correction,"duluth");

There's apparently no closing brace for this IF statement.

Signature

Lola - mailto:lola@his.com
http://www.lolajl.net | Blog at http://www.lolajl.net/blog/
Terrorismus delendus est! (Terrorism must be destroyed utterly!)
I'm in Bowie, MD, USA, halfway between DC and Annapolis.

Morbus Iff - 18 May 2005 14:01 GMT
>> Well, that's a normal old syntax error - you just put the $! in the
>> wrong place. Ignoring that, did you correct your typo, per my previous
>> message? http://www.nntp.perl.org/group/perl.macosx/8991

Uh... so, you corrected your "wsdl" typo BEFORE making the $! change or
after? The syntax error you got above has nothing to do with the "wsdl"
typo, and everything to do with the fact that you incorrectly added the
$!. Can you UNDO the changes you made for the $! and focus ONLY on getting
the filename right first, per my previous message?

If you're still focused on the $! part (which is merely going to give you
and us more information about your problem, not fix it), then you want
UNDO whatever you just did, and change the following line:

 open(WSDL,"$wsdl") ||
    die("\n\n\n\nIllegal WSDL File Location - $wsdl\n\n\n\n");

To (notice the addition of the $!):

 open(WSDL,"$wsdl") ||
   die("\n\n\n\nIllegal WSDL File Location - $wsdl: $!\n\n\n\n");

But still, I think the crux of your problem
is that you were typing "wdsl" instead of "wsdl".

Signature

Morbus Iff ( you are nothing without your robot car, NOTHING! )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
Spidering Hacks: http://amazon.com/exec/obidos/ASIN/0596005776/disobeycom
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus

Lola Lee - 18 May 2005 14:11 GMT
> Uh... so, you corrected your "wsdl" typo BEFORE making the $! change or
> after? The syntax error you got above has nothing to do with the "wsdl"
> typo, and everything to do with the fact that you incorrectly added the
> $!. Can you UNDO the changes you made for the $! and focus ONLY on
> getting the filename right first, per my previous message?

Okay . . . I undid the changes, and ran through the process again,
making sure the filename were correct, and here's what I got:

Can't locate object method "new" via package "WebService::GoogleHack" at
t/1.t line 85, <STDIN> line 5.
# Looks like you planned 2 tests but only ran 1.
# Looks like your test died just after 1.
t/1....dubious

        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-2

Signature

Lola - mailto:lola@his.com
http://www.lolajl.net | Blog at http://www.lolajl.net/blog/
Terrorismus delendus est! (Terrorism must be destroyed utterly!)
I'm in Bowie, MD, USA, halfway between DC and Annapolis.

Morbus Iff - 18 May 2005 14:22 GMT
> Okay . . . I undid the changes, and ran through the process again,
> making sure the filename were correct, and here's what I got:
[quoted text clipped - 5 lines]
> t/1....dubious
>   Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-2

At which point, this looks like an error in the module and/or tests (it
appears the author placed the GoogleHack.pm file in the root of the
archive, as opposed to the proper lib/WebService). You can either contact
the author of the module for more information, or simply "force" the
install ("force install WebService::GoogleHack" at your cpan> prompt) and
proceed merrily. Forcing the install will tell CPAN to install the module
regardless of errors. In some cases, this could mean a broken module (ie.,
your future scripts that use WebService::GoogleHack won't work as you
intend) and in others, it could work beautifully without a problem.

I'm ignorantly doubtful that a force install will work correctly - the
structure of his archive seems quite different than most normal Perl
packages. If the force install doesn't work, you could move the
GoogleHack.pm file manually into /Library/Perl/WebService/.

Signature

Morbus Iff ( you are nothing without your robot car, NOTHING! )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
Spidering Hacks: http://amazon.com/exec/obidos/ASIN/0596005776/disobeycom
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus

Joel Rees - 18 May 2005 14:54 GMT
> [...]
> Now, $! . . . what does this do?  I looked in perldebtut and it says
> that "!" means, redo a previous command, but what is the purpose of
> "$"?  And, where should I be putting this in, again?

Just so this doesn't get lost in the wash, $! is a special variable.
(Has nothing to do with the "!" command explained in perldebtut.) The
contents of the special variable "$!" is the text version of the error
message of the last error which occurred.

There's a whole swarm of these special variables that use the $ sign
with punctuation, including $_ . There are even some that are hashes or
arrays, rather than scalars, and begin with % or @ instead of $.

For more information, type

    perldoc perlvar

at the command line.
Morbus Iff - 17 May 2005 21:25 GMT
> When I ran this again, it died with this message:
> Illegal WSDL File Location - /Library/WebServer/Documents/GoogleSearch.wdsl

Mmkay, could you do the following for me, in a Terminal:

 ls -al /Library/WebServer/Documents/

The term "Illegal" isn't very helpful here - according to the t/1.t, it's
just failing to open the file - there's nothing really "illegal" about
that. It could be that the cpan process doesn't have read permissions to
the file (such that the file is root:root 600, and the cpan process is
running as your user), and that's what the "ls -al" will tell us.

On the other hand, are you actually trying to install this using the
"cpan" process, or are you running through the install manually?

Signature

Morbus Iff ( you are nothing without your robot car, NOTHING! )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
Spidering Hacks: http://amazon.com/exec/obidos/ASIN/0596005776/disobeycom
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus

Lola Lee - 17 May 2005 21:43 GMT
> it's just failing to open the file - there's nothing really "illegal"
> about that. It could be that the cpan process doesn't have read
> permissions to the file (such that the file is root:root 600, and the
> cpan process is running as your user), and that's what the "ls -al" will
> tell us.

-rw-r--r--    1 lola   admin   7694 Aug 30  2002 GoogleSearch.wsdl

> On the other hand, are you actually trying to install this using the
> "cpan" process, or are you running through the install manually?

I'm using the "cpan" process.

Signature

Lola - mailto:lola@his.com
http://www.lolajl.net | Blog at http://www.lolajl.net/blog/
Terrorismus delendus est! (Terrorism must be destroyed utterly!)
I'm in Bowie, MD, USA, halfway between DC and Annapolis.

Morbus Iff - 17 May 2005 21:55 GMT
> -rw-r--r--    1 lola   admin   7694 Aug 30  2002 GoogleSearch.wsdl

You're typing in "wdsl" not "wsdl":

  Illegal WSDL File Location -
  /Library/WebServer/Documents/GoogleSearch.wdsl

Signature

Morbus Iff ( you are nothing without your robot car, NOTHING! )
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
Spidering Hacks: http://amazon.com/exec/obidos/ASIN/0596005776/disobeycom
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.