NAME
Scalar::Dynamizer::Tie - Internal implementation for Scalar::Dynamizer
VERSION
Version 1.000
SYNOPSIS
This module is not intended to be used directly. It is used internally by Scalar::Dynamizer to implement the tied scalar behavior.
DESCRIPTION
Scalar::Dynamizer::Tie
is a tied scalar class that computes a dynamic value each time the scalar is accessed. The actual logic for computing the value is provided via a code reference when the scalar is tied.
METHODS
TIESCALAR
my $object = Scalar::Dynamizer::Tie->TIESCALAR($code);
Constructor for the tied scalar. Takes a code reference as its argument, which will be executed each time the scalar's value is accessed.
Parameters
$code
(required)A code reference that computes the scalar's value on access.
Returns
A blessed object representing the tied scalar.
FETCH
my $value = $object->FETCH();
This method is called whenever the tied scalar's value is accessed. It executes the code reference provided during TIESCALAR
to compute and return the current value of the scalar.
Returns
The value computed by the code reference.
STORE
$object->STORE($value);
This method is called whenever an attempt is made to assign a value to the tied scalar. Since dynamic scalars are immutable, this method throws an exception.
Throws
Cannot assign to a dynamic scalar
LIMITATIONS
This class is not intended for direct use. Use Scalar::Dynamizer instead.
AUTHOR
Jeremi Gosney, <epixoip at cpan.org>
BUGS
Please report any bugs or feature requests to bug-scalar-dynamizer at rt.cpan.org
, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Scalar-Dynamizer. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Scalar::Dynamizer::Tie
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
CPAN Ratings
Search CPAN
LICENSE AND COPYRIGHT
This software is Copyright (c) 2025 by Jeremi Gosney.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)