Can't locate object method ... utf8_heavy.pl

B

Brad Baxter

Hello,

This is perl, v5.6.1 built for sun4-solaris.

I'm getting the following error:

Can't locate object method "ToLower" via package "main" (perhaps you
forgot to load "main"?) at /usr/local/lib/perl5/5.6.1/utf8_heavy.pl line
30.

I've narrowed it down to this line (in a much longer program):

lc $term;

where $term eq 'id aarl001-003 ' (as far as I've been able to determine).

I'm not able to duplicate this error with a short program, so I feel it
must have to do with modules I've used. But I'm having a heck of a time
tracking it down. I'll show more code if it will help, but I'm wondering
if this is a familiar situation and might have a simple explanation.

I've looked at perldoc -f lc, the perllocale manpage, the utf8 manpage,
and google groups, and I've done various experiments, but I've gotten to
where I'm just shooting in the dark, I'm afraid.

Can anyone provide some hints how I might track this down?

Thanks,

Brad
 
B

Ben Morrow

Quoth Brad Baxter said:
Hello,

This is perl, v5.6.1 built for sun4-solaris.

I'm getting the following error:

Can't locate object method "ToLower" via package "main" (perhaps you
forgot to load "main"?) at /usr/local/lib/perl5/5.6.1/utf8_heavy.pl line
30.

I've narrowed it down to this line (in a much longer program):

lc $term;

where $term eq 'id aarl001-003 ' (as far as I've been able to determine).

My guess would be that this string actually has some utf8 characters in
it, or has had at some point in the past. If you need to do Unicode
work, you would be *much* better off with 5.8; alternatively, if you are
acquiring unicode strings by accident you may be able to help things
with a 'use bytes' in various strategic places.

Not having 5.6 installed, can you post line 30 (with a decent amount of
context) of /.../utf8_heavy.pl?

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,247
Members
46,844
Latest member
JudyGvh32

Latest Threads

Top