The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


MooseX::Types::Digest - Digest datatypes for Moose


 package Foo;

 use Moose;
 use Moose::Util::TypeConstraints;
 use MooseX::Types::Digest qw( MD5 SHA1 SHA224 SHA256 SHA384 SHA512 SHA3_224, SHA3_256, SHA3_384 and SHA3_512 );

 has md5  => ( is => 'rw', isa => MD5  );
 has sha1 => ( is => 'rw', isa => SHA1 );

Some string type constraints that match commonly used hexdigests. See Digest::MD5, Digest::SHA1 or Digest::SHA3.

  • MD5

    A Str that looks like a valid MD5 hexdigest.

  • SHA1

    A Str that looks like a valid SHA1 hexdigest.


 Michael Langner, C<< <mila at> >>
 Stevan Little, C<< <stevan.little at> >>
 Gregory Oschwald, C<< <oschwald at > >>


Please report any bugs or feature requests to bug-moosex-types-digest at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


Copyright 2014 Michael Langner, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.