CPAN愛のモジュール - Acmeから始まらない物語


(firstly written in Japanese, later in English)

CPANモジュールって便利ですよね! ところで、皆さんはCPAN屈指のLoveなモジュールをご存じでしょうか?

ええ、あるんですよ! ずばり名前空間Loveから始まるモジュールが!


このモジュールに二人の名前を渡すと相性度を教えてくれます! まあ素敵。

use strict;
use Love::Match::Calc;

my $first  = "Nagisa";
my $second = "Honoka";

my $m = lovematch( $first, $second );

print "$first と $second の相性は…… $m%\n";



なんじゃこりゃ? これはPerlの皮を被ったCだ。Acme::*下にあれば良かったのに。それと、関数が不必要にプロトタイプを強制している。さらに、このモジュールは感情のカクテルたる”Love”と無関係だ。何か上手いこと頭文字をとってるわけでもないし。(Gene Boggs)


my $lettermitte = ceil($anzletter/2);


Lesson4 Acmeじゃなくても油断しない*1


* ----------------------------------------------------
* English version
* ----------------------------------------------------
TITLE: CPAN Love module - A stroy not started from Acme

Hello everyone. I'm makamaka, want to be not a love explorer but a love planter.

Do you know the most 'LOVE' cpan module?
Yes, there is a Love namespace module.

That is Love::Match::Calc.

It calculates the love factor between two names. Sounds cool!

use strict;
use Love::Match::Calc;

my $first  = "Nagisa";
my $second = "Honoka";

my $m = lovematch( $first, $second );

print "Lovematch for $first and $second: $m%\n";

Now, CPAN module can calculate a love factor!

Threre is a review.

WTF? This is c in perl clothing. It would have been proper to file this under the Acme::* namespace. Also,
the functions needlessly enforce prototyping. Also, this has nothing to do with the emotion cocktail that is "love." If it is some clever acronym, the documentation doesn't say so - because there is none. (Gene Boggs)

'c in perl clothing' means that this module requires Math::Cephes which is C math library interface module.
Though it uses the function at the one line....

my $lettermitte = ceil($anzletter/2);

Is POSIX no good?

Lesson4 Be on your guard against no Acme name module *2

There are CPAN modules that have no Acme name but emmit Acme smell. Well, in this winter vacation, would you like to travel to explore them.

*1: Lesson1-3は1日目の記事を参照ください
*2: See to the first day article for Lesson1-3