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

Discussion in 'Perl Misc' started by Brad Baxter, Aug 26, 2004.

  1. Brad Baxter

    Brad Baxter Guest

    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
    Brad Baxter, Aug 26, 2004
    #1
    1. Advertising

  2. Brad Baxter

    Ben Morrow Guest

    Quoth 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).


    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

    --
    perl -e'print map {/.(.)/s} sort unpack "a2"x26, pack "N"x13,
    qw/1632265075 1651865445 1685354798 1696626283 1752131169 1769237618
    1801808488 1830841936 1886550130 1914728293 1936225377 1969451372
    2047502190/' #
    Ben Morrow, Sep 1, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. GMI
    Replies:
    3
    Views:
    501
    Tad McClellan
    Jun 19, 2005
  2. Replies:
    0
    Views:
    102
  3. David Solimano

    Re: Missing utf8_heavy.pl

    David Solimano, Apr 7, 2012, in forum: Perl
    Replies:
    0
    Views:
    1,499
    David Solimano
    Apr 7, 2012
  4. Peter J. Holzer

    Re: Missing utf8_heavy.pl

    Peter J. Holzer, Apr 8, 2012, in forum: Perl Misc
    Replies:
    1
    Views:
    747
    Peter J. Holzer
    Apr 9, 2012
  5. Rainer Weikusat

    Re: Missing utf8_heavy.pl

    Rainer Weikusat, Apr 13, 2012, in forum: Perl Misc
    Replies:
    0
    Views:
    604
    Rainer Weikusat
    Apr 13, 2012
Loading...

Share This Page