[tpm] POD encoding question

Jim Graham james.a.graham at gmail.com
Wed May 21 11:29:25 PDT 2008


This is a bug in 5.8.x and should be fixed in 5.10

   http://rt.perl.org/rt3/Public/Bug/Display.html?id=47271

  It would appear you need version 1.4301 of Pod::Checker.

  I tested your code on 5.8.8 and 5.10 on Mac OS X 10.5.2 and I got  
the bug with 5.8.8 and it's fixed in 5.10 (ie. no "Unknown command  
paragraph "=encoding utf8" " error). However, the UTF characters  
weren't printed correctly when running the POD. I'm not sure if that's  
a Perl error or a shell error.

regards, Jim


Source
------
    # You can set (...) as a hash reference. Ie:
   my $hr=TB::Get->new({
         use_base_2      =>      0,
         use_24h         =>      0,
         say_am          =>      "午前",
         say_pm          =>      "午後",
         date_seperator  =>      "/",
         time_seperator  =>      "."
   });


Terminal
-------
          #−−−−−
          use TB::Get;

          # Get a handle on the TB::HumanReadable methods.
          my $hr=TB::Get−>new;

           # You can set (...) as a hash reference. Ie:
          my $hr=TB::Get−>new({
                use_base_2      =>      0,
                use_24h         =>      0,
                say_am          =>      "XX",
                say_pm          =>      "XX",
                date_seperator  =>      "/",
                time_seperator  =>      "."
          });


On 21-May-08, at 9:47 AM, Madison Kelly wrote:

> Hi all,
>
>   I'm having trouble with UTF-8 characters in my module's POD. I've  
> got
> the entry (truncated for brevity):
>
> =item new
>
> =encoding UTF-8
>
>   #-----
>   use TB::Get;
>
>   # Get a handle on the TB::HumanReadable methods.
>   my $hr=TB::Get->new;
>
>   # You can set (...) as a hash reference. Ie:
>   my $hr=TB::Get->new({
>   	use_base_2	=>	0,
>   	use_24h		=>	0,
>   	say_am		=>	"午前",
>   	say_pm		=>	"午後",
>   	date_seperator	=>	"/",
>   	time_seperator	=>	"."
>   });
>    #-----
>
> This is the constructor method used to access this module's methods.
>
> =cut
>
>   Now, when I try to read the POD using perldoc, I get:
>
> -=-=-=-=-=-
>        new
>           #-----
>           use TB::Get;
>
>           # Get a handle on the TB::HumanReadable methods.
>           my $hr=TB::Get->new;
>
>           # You can set (...) as a hash reference. Ie:
>           my $hr=TB::Get->new({
>                 use_base_2      =>      0,
>                 use_24h         =>      0,
>                 say_am          =>      "åå",
>                 say_pm          =>      "åå¾",
>                 date_seperator  =>      "/",
>                 time_seperator  =>      "."
>           });
> -=-=-=-=-=-
>
>   At the command line, I get:
>
> $ perldoc TB/Get
> ./TB/Get.pm:73: Unknown command paragraph "=encoding utf8"
> <standard input>:222: warning: can't find numbered character 141
> <standard input>:222: warning: can't find numbered character 141
> <standard input>:223: warning: can't find numbered character 141
> <standard input>:223: warning: can't find numbered character 140
>
>   Now, the '=encoding utf8' string is taken directly from the 'perldoc
> perlpod' documentation...
>
>   Any tips on what I am doing wrong?
>
> Thanks!
>
> Madi
>
> _______________________________________________
> toronto-pm mailing list
> toronto-pm at pm.org
> http://mail.pm.org/mailman/listinfo/toronto-pm



More information about the toronto-pm mailing list