use Carp instead of die when attribute is required
Merge pull request #142 from vti/croak_instead_of_die

use Carp instead of die when attribute is required