#! /usr/bin/perl

package Foo; use overload '""' => sub { "Nov" }; 1;
package main;

use strict;
use warnings;

use Test::More 0.88;
use Test::Exception;

use_ok("Date::Calc");

my $string = "Oct";
$string =~ /(.*)/;

lives_and { is Date::Calc::Decode_Month($1), 10 } 'Decode_Month($1) works';

lives_and { is Date::Calc::Decode_Month((bless {}, 'Foo')), 11 } 'Decode_Month() works with overloading';

done_testing();
