Acme-Drunk

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

NAME
    Acme::Drunk - Get Drunk, Acme Style

SYNOPSIS
        use Acme::Drunk;

        my $bac = drunk(
                        gender         => MALE, # or FEMALE
                        hours          => 2,    # since start of binge
                        body_weight    => 160,  # in lbs
                        alcohol_weight => 3,    # oz of alcohol
                       );

       $bac >= 0.08 ? call_cab() : walk_home();

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

lib/Acme/Drunk.pm  view on Meta::CPAN

=head1 NAME

Acme::Drunk - Get Drunk, Acme Style

=head1 SYNOPSIS

    use Acme::Drunk;

    my $bac = drunk(
		    gender         => MALE, # or FEMALE
		    hours          => 2,    # since start of binge
		    body_weight    => 160,  # in lbs
		    alcohol_weight => 3,    # oz of alcohol
                   );

   $bac >= 0.08 ? call_cab() : walk_home();

=head1 DESCRIPTION

Calculating an accurate Blood Alcohol Concentration isn't as easy as it
sounds. Acme::Drunk helps elevate the burden placed on the Average Joe,

t/01_test.t  view on Meta::CPAN

use Test::More qw[no_plan];
use strict;
use warnings;

BEGIN { use_ok 'Acme::Drunk' }

my $bac = drunk(
                gender         => MALE, # or FEMALE
                hours          => 2,    # since start of binge
                body_weight    => 150,  # in lbs
                alcohol_weight => 3,    # oz of alcohol
               );

cmp_ok( sprintf("%.2f",$bac), '==', sprintf("%.2f",0.125491176470588) );



( run in 0.424 second using v1.01-cache-2.11-cpan-0d8aa00de5b )