NAME
DBIx::QuickORM::Util::Mask - Lazily-built wrapper that hides a heavy object from dumps and stack traces while delegating to it.
DESCRIPTION
Wraps an object so it does not bloat Data::Dumper output or Carp stack traces (a single masked DateTime, for example, would otherwise dump hundreds of lines), while still behaving like the object for method calls.
The wrapped object is built lazily: the generator is not run until the value is actually used (a method call, numification, etc.). Stringification is the exception - it returns a fixed display string and never triggers the generator, so printing a value is always cheap.
The real object lives inside the generator closure, never in a visible slot, so it stays hidden from dumps even after it has been built.
SYNOPSIS
use DBIx::QuickORM::Util::Mask;
my $mask = DBIx::QuickORM::Util::Mask->new(
string => "2026-05-24 12:00:00", # what it stringifies to
generator => sub { expensive_parse(...) },
mask_class => 'My::Subclass', # optional, defaults to this class
);
print "$mask"; # the display string, nothing is built
$mask->some_method; # builds the object (once) and delegates
SOURCE
The source code repository for DBIx::QuickORM can be found at https://github.com/exodist/DBIx-QuickORM.
MAINTAINERS
AUTHORS
COPYRIGHT
Copyright Chad Granum <exodist7@gmail.com>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.