NAME
Picture::Lock::CLI - the piclock command, for a program to run
VERSION
Version 0.02
SYNOPSIS
use Picture::Lock::CLI;
exit Picture::Lock::CLI->run(@ARGV);
my $status = Picture::Lock::CLI->run('lock', 'Accounts', '--image', 'harbour.jpg');
my $status = Picture::Lock::CLI->run('unlock', 'Accounts.plock', '--image', 'harbour.jpg');
DESCRIPTION
Everything the piclock command does, given a command line as a list. A program that wants what the command does, with its messages and its exit status, calls this and does not start another process to get it.
It reads the standard input of the program it is called in and writes to that program's standard output and standard error, as the command does. Where clicks are not on the command line or on standard input it asks for them in the terminal, with Picture::Lock::Picker, and it asks for a passphrase there too, with nothing shown.
A program that wants to lock and unlock without any of that calls Picture::Lock itself.
METHODS
run
my $status = Picture::Lock::CLI->run(@words);
Runs one command. The words are what would follow piclock on a command line, the verb first. It returns the status the command would end with, and does not end the program: 0 when it is done, 1 when what was offered does not open the file, 2 when the file is damaged, 3 when it refused and made nothing, 4 for a command line that is wrong and 5 when the machine could not give it a file, memory or random bytes. piclock has each in full.
Every click and every passphrase it was given or asked for is wiped before it returns.
usage
print Picture::Lock::CLI->usage;
The text that piclock --help prints.
SEE ALSO
piclock, Picture::Lock, Picture::Lock::Picker
AUTHOR
LNATION <email@lnation.org>
LICENSE AND COPYRIGHT
This software is Copyright (c) 2026 by LNATION <email@lnation.org>.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)