[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Interesting problem



Carl Johan Berglund wrote:
> 
> Two ideas:
> 
> Are you sure that all _require_d files were present on both systems
> (Linux/Mac)?
> 
> MacPerl can be picky about line endings. For instance, if I give MacPerl
> the program
> 
> #!perl
> print "Hello, world";
> 
> where the line ending is an LF (Unix line ending) and not a CR (Mac OS line
> ending), it wont print anything. Are you sure you converted the line
> endings when you moved files back and forth?

That might explain what happened on the Mac.  Though it was on the Mac
that I developed the thing and then moved it back and forth to the Unix
box and the problem developed at the same time on both systems.  (Sort
of ironic since it's now off of the Mac and only on the Unix box.  But
the Mac has a better development interface.  What can I say?)  :-)

After re-examining the problem I've come to the conclusion that what the
problem was was that nothing was being sent back to the server at first
(due to my somehow changing all of the $theReply's to $addOn) which is
where the error first developed.  I've since then replaced all of the
$addOn's with $theReply's.  But why would both versions of Perl (Mac or
Unix) say the error was at the first line of the program?  And only when
run through the server?  Here is an example of the server log:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Loading DB routines from perl5db.pl version 1.01
Emacs support available.
    
Enter h or `h h' for help.

main::(/disk4/igoal/Scripts/crdb/chgUser.cgi:25):
25:     require "generic.pl";
  DB<1> Operator or semicolon missing before &firstName at (eval 3) line
2, <IN> chunk 1.
    
Cannot print stack trace, load with -MCarp option to see stack at
/usr/local/lib/perl5/perl5db.pl line 1833, <IN> chunk 1.
Ambiguous use of & resolved as operator & at (eval 3) line 2, <IN> chunk
1.

Cannot print stack trace, load with -MCarp option to see stack at
/usr/local/lib/perl5/perl5db.pl line 1833, <IN> chunk
1.  
Operator or semicolon missing before &lastName at (eval 3) line 2, <IN>
chunk 1.
    
Cannot print stack trace, load with -MCarp option to see stack at
/usr/local/lib/perl5/perl5db.pl line 1833, <IN> chunk 1.
Ambiguous use of & resolved as operator & at (eval 3) line 2, <IN> chunk
1.

Cannot print stack trace, load with -MCarp option to see stack at
/usr/local/lib/perl5/perl5db.pl line 1833, <IN> chunk
1.  
Operator or semicolon missing before &mailCode at (eval 3) line 2, <IN>
chunk 1.
    
Cannot print stack trace, load with -MCarp option to see stack at
/usr/local/lib/perl5/perl5db.pl line 1833, <IN> chunk 1.
Ambiguous use of & resolved as operator & at (eval 3) line 2, <IN> chunk
1.

Cannot print stack trace, load with -MCarp option to see stack at
/usr/local/lib/perl5/perl5db.pl line 1833, <IN> chunk
1.  
Operator or semicolon missing before &phoneNumber at (eval 3) line 2,
<IN> chunk 1.
    
Cannot print stack trace, load with -MCarp option to see stack at
/usr/local/lib/perl5/perl5db.pl line 1833, <IN> chunk 1.
Ambiguous use of & resolved as operator & at (eval 3) line 2, <IN> chunk
1.                                     
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

This is from the unix side (since I'm at work presently but not at my
desk).  Line 25 is the first executable line within the file. 
Everything up to that point are just comments.  No where within the
entire set of files is there an "&firstName".  All of them are
"$firstName".  Using the -MCarp option doesn't do any better.  (ie:
already tried it.)

But like I said - this has been fixed.  It's just a strange but true
thing to look out for and I thought I'd post to let people see this. 
Just in case someone else came up against it.  :-)

So don't try to fix this.  This is more of a FYI kind of thing.  :-)

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch