Skip to main content.
home | support | download

Back to List Archive

Re: "Ambiguous use" swish.cgi error

From: Kate Ericson <kericson(at)not-real.ucsd.edu>
Date: Mon Jan 28 2002 - 17:51:16 GMT
Thanks for your quick reply -- looks like you've helped a lot of people out 
on this discussion board.  The ambiguous use errors were eliminated by 
putting quotes around reserved words, but I still crash with the following 
error:

syntax error at ./swish.cgi line 693, near ") for "
BEGIN not safe after errors--compilation aborted at ./swish.cgi line 1079.

My perl -v is:
This is perl, version 5.005_03 built for sun4-solaris

I can try to get our sys admin. to upgrade perl, but if you have an 
alternate solution that would be great....
Kate


At 11:10 PM 1/25/2002 -0800, you wrote:
>At 06:58 PM 1/25/2002 -0800, Kate Ericson wrote:
>
> >I set up the most basic .swishcgi.conf in the same directory as swish.cgi
> >(and didn't edit the configuration parameters in swish.cgi), and I believe
> >the script is correctly pointing to the location of my perl program and the
> >modules.  My .swishcgi.conf file is as follows:
> >
> >return {
> >  title => 'Search',
> >  swish_binary => '.[my path to executable]/swish-e',
> >  swish_index => '[my path to index]/index.swish-e',
> >};
>
>This works for me:
>
>~/rich > cat .swishcgi.conf
>return {
>   title => 'Search',
>   swish_binary => './swish-e',
>   swish_index => 'index.swish-e',
>};
>
> >However, when I run ./swish.cgi I get a bunch of "Ambiguous use" errors,
> >such as "Ambiguous use of package => resolved to "package" => at
> >./swish.cgi line 304".  These errors end with "BEGIN not safe after
> >errors--compilation aborted at ./swish.cgi line 1079."
> >
> >Any help is greatly appreciated!
>
>What version of perl are you using?
>
>58) ~ %perl5.00503 -we '%x = ( package => 4 )'
>Name "main::x" used only once: possible typo at -e line 1.
>
>59) ~ %perl5.005 -we '%x = ( package => 4 )'
>Name "main::x" used only once: possible typo at -e line 1.
>
>60) ~ %perl5.002 -we '%x = ( package => 4 )'
>Ambiguous use of package => resolved to "package" => at -e line 1.
>Identifier "main::x" used only once: possible typo at -e line 1.
>
>This is perl, version 5.004_01
>
>Copyright 1987-1997, Larry Wall
>
>Perl may be copied only under the terms of either the Artistic License or the
>GNU General Public License, which may be found in the Perl 5.0 source kit.
>
> >/usr/local/bin/perl  -we '%x = ( package => 4 )'
>Ambiguous use of package => resolved to "package" => at -e line 1.
>Name "main::x" used only once: possible typo at -e line 1.
>
>Looks like you are using a very old version of perl.
>
>Regardless, I'd think that's just a warning telling you that "package" is a
>reserved word and is placing it in quotes.  Newer perls are smart enough to
>see that "package" in no used in a keyword context and that there's nothing
>to fix.
>
>But the being not safe is odd.  You really need a newer perl, but you can
>put that "package" in quotes on the line specified above, and then run the
>script from the command link to see if you get any errors.
>
>
>
>
>
>Bill Moseley
>mailto:moseley@hank.org



*********************************************************************
Due to deletion of content types excluded from this list by policy,
this multipart message was reduced to a single part, and from there
to a plain text message.
*********************************************************************
Received on Mon Jan 28 17:51:59 2002