Quiq::Reference - Operationen auf Referenzen
Die Klasse stellt Methoden auf Referenzen zur Verfügung, insbesondere, um den Grundtyp einer Referenz zu ermitteln.
$refType = $class->refType($ref);
reftype()
Ist $ref eine Referenz, liefere den Grundtyp der Referenz. Ist $ref keine Referenz, liefere einen Leerstring.
Grundtypen sind:
SCALAR ARRAY HASH CODE GLOB IO REF
Details siehe: perldoc -f ref.
perldoc -f ref
$bool = $class->isBlessedRef($ref);
isBlessed()
$bool = $class->isArrayRef($ref);
$bool = $class->isHashRef($ref);
$bool = $class->isCodeRef($ref);
$bool = $class->isRegexRef($ref);
Wenn die Regex-Referenz umgeblesst wurde, muss sie auf eine Subklasse von Regex geblesst worden sein, sonst schlägt der Test fehl. Aktuell gibt es nicht den Grundtyp REGEX, der von reftype() geliefert würde, sondern eine Regex-Referenz gehört standardmäßig zu der Klasse Regex.
1.145
Frank Seitz, http://fseitz.de/
Copyright (C) 2019 Frank Seitz
This code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Quiq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Quiq
CPAN shell
perl -MCPAN -e shell install Quiq
For more information on module installation, please visit the detailed CPAN module installation guide.