Chris Weyl

NAME

PerlIO::via::GnuPG::Maybe - Layer to decrypt or pass-through unencrypted data on read

VERSION

This document describes version 0.003 of PerlIO::via::GnuPG::Maybe - released April 08, 2014 as part of PerlIO-via-GnuPG.

SYNOPSIS

    use PerlIO::via::GnuPG::Maybe;

    # cleartext.txt may or may not be encrypted;
    # returns the content or dies on any other error.
    open(my $fh, '<:via(GnuPG::Maybe)', 'cleartext.txt')
        or die "cannot open! $!";

    my @in = <$fh>; # or whatever...

DESCRIPTION

This is a PerlIO module to decrypt files transparently. If you try to open and read a file that is not encrypted, we will simply pass that file through unmolested. If you try to open and read one that is encrypted, it tries to decrypt it and pass it back along to you.

If you're looking for a stricter implementation, see PerlIO::via::GnuPG; it will die if the file is unencrypted.

It's pretty simple and does not support writing, but works.

...and if it doesn't, please file an issue :)

SEE ALSO

Please see those modules/websites for more information related to this module.

SOURCE

The development version is on github at http://github.com/RsrchBoy/PerlIO-via-GnuPG and may be cloned from git://github.com/RsrchBoy/PerlIO-via-GnuPG.git

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/RsrchBoy/PerlIO-via-GnuPG/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHOR

Chris Weyl <cweyl@alumni.drew.edu>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2013 by Chris Weyl.

This is free software, licensed under:

  The GNU Lesser General Public License, Version 2.1, February 1999