pod


名前

Acme::Drunk - オラは酔っ払っただ (Get Drunk, Acme Style)


概要

    use Acme::Drunk;
    my $bac = drunk(
                    gender         => MALE, # もしくは FEMALE
                    hours          => 2,    # どんちゃん騒ぎ開始後の時間
                    body_weight    => 160,  # 体重(ポンド)
                    alcohol_weight => 3,    # アルコールの量(オンス)
                   );
   $bac >= 0.08 ? call_cab() : walk_home();


説明

Calculating an accurate Blood Alcohol Concentration isn't as easy as it sounds. Acme::Drunk helps elevate the burden placed on the Average Joe, or Jane, to know if they've had too much to drink.

正確な血中アルコール濃度の計算は思ったほど簡単ではない。Acme::Drunkは そこらにいるジョーやジェーンが飲みすぎたかどうかを知るために、 彼らにのしかかった重石を持ち上げる手伝いをする。

You might think to yourself, ``but wait a minute, all I need is a fancy breathalizer test!'' You'd be wrong. For the same reasons that The Man are often wrong on the street, and have to bring you in for a blood test. Those generic devices don't take into account important issues in drunkenness, but Acme::Drunk does.

君は自分に言い聞かせるかもしれない。「だがちょっと待ってくれ、必要 なのは、なんだかよくわからない呼気測定器によるテストなんじゃないか!」 君は間違っているだろう。人々はしばしば往来で過ちを犯すものであり、 君が血液検査をうけなければならなくなるのと同じ理由からだ。 このような一般的な装置は酩酊における重要な問題を考慮にいれていない。 しかしAcme::Drunkはそれを行なう。

Now all you need to be a law abiding citizen is your laptop, and we all have those at the pub, right? Right.

善き市民であるために君に必要なものは今や、ノートパソコンだ。 我々は皆それを飲み屋に持ってきている。そうだね? よろしい。

定数

Acme::Drunk exports two constants, MALE and FEMALE. You're drunk if you don't know which one to use.

Acme::Drunkは二つの定数MALE(♂)とFEMALE(♀)をエクスポートする。 もしどちらを使えばいいのかわからないなら、あなたは酔っ払っている。

drunk()

drunk() takes four named parameters, detailed below, and returns the Blood Alcohol Concentration (BAC) as a number. Note that drunk() couldn't return a true value for drunkenness because not all jurisdictions agree on what the proper BAC level is to be drunk.

drunk()は四つの名前付きパラメータをとる。詳細は下にある。そして 数字として血中アルコール濃度(BAC)を返す。注意して欲しいのだが、 drunk()は酩酊のための本当の値を返すことはできないだろう。なぜなら、 酔っ払いを示す適切なBACレベルは何かということについて、全ての司法管区が 一致しているわけではないからだ。

gender
Currently Acme::Drunk only works for humans, and only recognizes MALE and FEMALE human genders. Use the constants exported for you to identify your gender.

現在、Acme::Drunkは人間用のみに動作する。そしてMALE及びFEMALEという 人間の性別だけを認識をする。あなたの性別を確定するためにエクスポートされた この定数を使うこと。

If your gender or species isn't supported, please email the author.

もしあなたの性別や種がサポートされていない場合、作者にメールして頂きたい。

If you don't know your gender or species, you are drunk.

自分の性別や種がわからないなら、あなたは酔っ払っている。

hours
This numeric value represents how long you have been drinking. If you took your first sip three hours ago, it's important to note. Your body metabolizes alcohol at a steady per-hour pace.

この数値は、あなたが飲み始めてからどれくらい経ったかを表している。 3時間前に最初の一口を飲んだなら、注意することが大切だ。あなたの体は 一時間ごとのペースで絶えずアルコールを代謝している。

body_weight
Your body weight is also important. Not all people are created equal, and the amount of alcohol one body can saturate is much different than another body.

体重もこれまた重要だ。万人は平等につくられているわけではなく、 体が吸収できるアルコールの量は人によって大きく異なる。

alcohol_weight
The weight of alcohol you've had in ounces. This can be hard to calculate, and two helpful functions are exported for your use. Here is a common example, Guiness Gold Lager.

あなたが飲んだアルコールの重さをオンスで。これは計算が困難なので、 二つの便利な関数がエクスポートされる。ありがちな例として ギネスゴールドラガーの場合。

  my $alcohol_weight = floz_to_etoh( 16, proof_to_percent( 8.48 ) );

Acme::Drunk can't do these sorts of calculations for you. You might be a raging alcoholic, drinking 45 beers a night, or so many different drinks that Acme::Drunk can no-longer keep track.

Acme::Drunkはあなたのために以下のような類の計算ができるわけではない。 [例えば]あなたが極度のアル中で、一晩にビール45杯飲んだり、あまりにも 色々な酒を飲んだりしたら、Acme::Drunkはもはや追跡しきれないのだ。

If there is interest, Acme::Drunk may have an accompanying Acme::Drunk::Drinks package containing constants such as GUINESS_DRAUGHT_CAN, JACK_DANIELS, or NyQUIL. Please contact the author. Here would be an example.

興味があるなら、Acme::Drunkは付随するAcme::Drunk::Drinksを持つかも しれない。これはGUINESS_DRAUGHT_CANJACK_DANIELSNyQUIL といった定数を含むパッケージだ。作者に問い合わせて頂きたい。例を あげると。

  alcohol_weight => ( GUINESS_DRAUGHT_CAN*7 + JACK_DANIELS*3 ),

If you can't come up with the alcohol_weight you've had, don't worry, you might not yet be drunk.

自分の摂取したアルコール量に追いつけないなら、心配ご無用。 あなたはまだ酔っ払っていないかもしれないのだ。

proof_to_percent()

Accepts one argument, the proof number. Does a simple calculation to convert it to percent. Returns the percentage.

一つの引数、プルーフをとる。単純な計算を行いそれをパーセントに変換する。 パーセンテージを返す。

floz_to_etoh()

Accepts two arguments, the number of ounces a drink was, and the percentage of that drink that was alcohol. Returns the fluid ounces of alcohol contained in the drink.

二つの引数、酒のオンスとアルコール度数をとる。その酒に含まれる アルコールの液量オンスを返す。

ml_to_etoh()

For our less US-centric friends, this function is exactly like floz_to_etoh(), except its first argument is the number of ml in a drink.

中央アメリカ以外の友人向け。この関数はfloz_to_etoh()と全く同じだが、 こちらは最初の引数がミリリットルであることを除く。

動作原理

Widmark's Formula for Blood Alcohol Content

血中アルコール濃度を求めるWidmarkの公式。

  ( ( (FlozEtOH * 0.0514 lb/flozEtOH) * 1.044 g/ml )
    / (Lbs of person * Widmark r g%/mlhr) )
  - (Hours since first drink * Widmark beta)
  = BAC g%/ml = BAC g/dL = BAC% w/v

'nuff said.

よし、わかったぞ。


作者

Casey West <casey@geeknest.com>


著作権

Copyright (c) 2003 Casey West, All Rights Reserved. This module is released under the same terms as Perl itself.