Hi! Please consider following me on twitter: @hanekomu.

use 箆; or: Distributions with Kanji on CPAN

During the YAPC::Asia hackathon day 2, we discovered a kanji that we could use for Moose.pm: 箆. It even looks a bit like some thing with antlers. Here is the JEDict definition:

箆 [へら: HERA] spatula
箆鹿 [へらじか: HERAJIKA] (uk) moose, elk

So a moose is an animal with a spatula on its head? Larry said that 箆 could also mean "comb", so a moose is an animal with a comb on its head. But I digress.

I've made a simple proof-of-concept distribution. The main module's code basically is:

use utf8;
package 箆;
1;

perl Makefile.PL, make, make test and make dist all worked well. It produced a tarball: 箆.tar.gz. So far, so good.

Then I've tried to upload the tarball to cpan:

$ cpan-upload-http 箆.tar.gz

That also gave no error message. So I waited for the emails from PAUSE. Here is the first one:

> Subject: Notification from PAUSE
>
> MARCEL (Marcel Grünauer == hanekomu (跳ね込む)) visited the PAUSE and
> requested an upload into his/her directory. The request used the
> following parameters:
>
> pause99_add_uri_upload [箆-0.01.tar.gz]
> SUBMIT_pause99_add_uri_httpupload [ Upload this file from my disk ]
> pause99_add_uri_httpupload [-0.01.tar.gz]
>
> The request is now entered into the database where the PAUSE daemon will
> pick it up as soon as possible (usually 1-2 minutes).
>
> During upload you can watch the logfile in
> https://pause.perl.org/pause/authenquery?ACTION=tail_logfile&pause99_tail_logfil e_1=5000.
>
> You'll be notified as soon as the upload has succeeded, and if the
> uploaded package contains modules, you'll get another notification from
> the indexer a little later (usually within 1 hour).
>
>
> Thanks for your contribution,
> --
> The PAUSE

Due to the good fortune of having kanji and kana in my CPAN display name (跳ね込む), I was sure that the email had the right encoding. But the tarball filename it returned was wrong: "箆-0.01.tar.gz". Well, let's see. Maybe it's just a problem with generating the email. Wait and see... Here is the second email:

> Subject: CPAN Upload: M/MA/MARCEL/-0.01.tar.gz
>
> The uploaded file
>
> -0.01.tar.gz
>
> has entered CPAN as
>
> file: $CPAN/authors/id/M/MA/MARCEL/-0.01.tar.gz
> size: 24392 bytes
> md5: 39ebd0b5ab4bd9acdb2a80c1c4a733dd
>
> No action is required on your part
> Request entered by: MARCEL (Marcel Grünauer == hanekomu (跳ね込む)))
> Request entered on: Sun, 18 May 2008 11:00:42 GMT
> Request completed: Sun, 18 May 2008 11:00:52 GMT
>
> Thanks,
> --
> paused, v996

Hm, doesn't look good either. Well, wait for the indexer report... Here it is:

> Subject: Failed: PAUSE indexer report MARCEL/-0.01.tar.gz
>
> The following report has been written by the PAUSE namespace indexer.
> Please contact modules@perl.org if there are any open questions.
> Id: mldistwatch 1001 2008-05-15 05:34:01Z k
>
> User: MARCEL (Marcel Gruenauer == hanekomu)
> Distribution file: -0.01.tar.gz
> Number of files: 21
> *.pm files: 14
> README: 箆-0.01/README
> META.yml: 箆-0.01/META.yml
> Timestamp of file: Sun May 18 11:00:51 2008 UTC
> Time of this run: Sun May 18 11:02:23 2008 UTC
>
> No package statements could be
> found in the distro (maybe a script or
> documentation distribution?)
>
> __END__

Ah, so it could actually untar it because it found the README and META.yml files. But it seems it uses the wrong regex to find the package statements. Maybe it needs to read the file as utf8...

Just to be sure it wasn't a problem with cpan-upload-http, I also uploaded the file from the PAUSE web interface directly. Here is the response:

> The Perl Authors Upload Server
>
> Upload a file to CPAN
> Add a file for MARCEL
> File successfully copied to '/home/ftp/incoming/-0.01.tar.gz'
> Your filename has been altered as it contained characters besides the class [A-Za-z0-9_\-\.\@\+].
> DEBUG: your filename['箆-0.01.tar.gz'] corrected filename['-0.01.tar.gz'].

So this doesn't work either.

The distribution actually does show up on my search.cpan.org page as -0.01. So it might be installable if you download manually, but it won't be installable via the CPAN shell. And I guess I've now 0wned the root namespace on CPAN...

Dear CPAN maintainers, please fix it.

Write a comment | Bookmark and Share

posted at: 15:16 | path: /dev | permalink | 0 comments | 0 trackbacks

Comments are closed for this story.

Trackbacks are closed for this story.