Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Can't locate object method ... utf8_heavy.pl
- Brad Baxter
August 26, 2004, 11:27 pm
rate this thread
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
I've narrowed it down to this line (in a much longer program):
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?
Re: Can't locate object method ... utf8_heavy.pl
> 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
> 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?
perl -e'print map sort unpack "a2"x26, pack "N"x13,
qw/1632265075 1651865445 1685354798 1696626283 1752131169 1769237618
1801808488 1830841936 1886550130 1914728293 1936225377 1969451372
2047502190/' # firstname.lastname@example.org
- » seeking Perl hackers to contribute to CGI Calendar
- — Previous thread in » PERL Discussions