GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Crypt::Random::Source::Base::Handle(3) User Contributed Perl Documentation Crypt::Random::Source::Base::Handle(3)

Crypt::Random::Source::Base::Handle - IO::Handle based random data sources

version 0.12

    use Moo;
    extends qw(Crypt::Random::Source::Base::Handle);

    sub open_handle {
        # invoked as needed
    }


    # this class can also be used directly
    Crypt::Random::Source::Base::Handle->new( handle => $file_handle );


    # it supports some standard methods:

    $p->blocking(0);

    $p->read( my $buf, $n ); # no error handling here

This is a concrete base class for all IO::Handle based random data sources.

It implements error handling

An IO::Handle or file handle to read from.

This is actually handled by "handle", and is documented in IO::Handle.

Whether or not under reading is considered an error.

Defaults to false.

The number of attempts to make at rereading if the handle did not provide enough bytes on the first attempt.

Defaults to 1.

Only used if "allow_under_read" is enabled.

See "get" in Crypt::Random::Source::Base.

When "blocking" or "allow_under_read" are set to a true value this method may return fewer bytes than requested.

This delegates directly to "handle".

It DOES NOT provide the same validation as "get" would have, so no checking for underreads is done.

Close the handle and clear it.

"$self->handle->read" but with additional error checking and different calling conventions.

Called by "_read" when not enough data was read from the handle. Normally it will either die with an error or attempt to reread. When "allow_under_read" is true it will just return the partial buffer.

Abstract method, should return an IO::Handle to use.

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Crypt-Random-Source> (or bug-Crypt-Random-Source@rt.cpan.org <mailto:bug-Crypt-Random-Source@rt.cpan.org>).

יובל קוג'מן (Yuval Kogman) <nothingmuch@woobling.org>

This software is copyright (c) 2008 by Yuval Kogman.

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

2016-03-11 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.