NAME
Web::Authn::NullObject - Chain-safe placeholder returned on error
DESCRIPTION
When "error" in Web::Authn or "pass_error" in Web::Authn is invoked in object context, it returns a Web::Authn::NullObject instead of undef so that method chains do not raise "Can't call method on an undefined value".
The object is boolean-false and stringifies to the empty string, so:
my $opts = $authn->generate_registration_options( %bad ) ||
die( $authn->error );
still works.
Any method called on it returns the same object.
METHODS
new
my $null = Web::Authn::NullObject->new;
Builds the placeholder. No arguments. Application code does not call this; "error" in Web::Authn does when the caller is in object context.
THREAD & PROCESS SAFETY
This module is designed to be fully thread-safe and process-safe, ensuring data integrity across Perl ithreads and mod_perl’s threaded Multi-Processing Modules (MPMs) such as Worker or Event.
AUTHOR
Jacques Deguest <jack@deguest.jp>
COPYRIGHT & LICENSE
Copyright(c) 2026 DEGUEST Pte. Ltd.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.