NAME
    Catalyst::Plugin::Upload::Digest - Compute digest of uploads with Digest

SYNOPSIS
        use Catalyst qw< Upload::Digest >;

        if ( my $upload = $c->request->upload( 'field' ) ) {
            # Get Digest::Whirlpool object
            my $whirlpool = $upload->digest( 'Whirlpool' );

            # Get the digest of the uploaded file, addfile() has already
            # been called on its filehandle.
            my $hexdigest = $whirlpool->hexdigest;

            # I want a SHA-512 digest too!
            my $sha512digest = $upload->digest( 'SHA-512' )->digest;
        }

DESCRIPTION
    Extends "Catalyst::Request::Upload" with a "digest" method that wraps
    Digest's construction method. Any arguments to it will be passed
    directly to Digest's constructor. The return value is the relevant
    digest object that has already been populated with the file handle of
    the uploaded file, so retriving its digest will work as expected.

EXAMPLE
    This module is distributed with a Catalyst example application called
    Upload::Digest, see the example/Upload-Digest directory in this
    distribution for how to run it.

BUGS
    Please report any bugs that aren't already listed at
    <http://rt.cpan.org/Dist/Display.html?Queue=Catalyst-Plugin-Upload-Diges
    t> to
    <http://rt.cpan.org/Public/Bug/Report.html?Queue=Catalyst-Plugin-Upload-
    Digest>

SEE ALSO
    Digest, Catalyst::Request::Upload

AUTHOR
    Ævar Arnfjörð Bjarmason <avar@cpan.org>

LICENSE
    This library is free software . You can redistribute it and/or modify it
    under the same terms as perl itself.

