Name : perl-Exporter-LexicalVars
| |
Version : 0.001
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 5.68
| Date : 2024-08-05 18:50:16
|
Group : Development/Libraries/Perl
| Source RPM : perl-Exporter-LexicalVars-0.001-5.68.src.rpm
|
Size : 0.04 MB
| |
Packager : (none)
| |
Summary : Export Lexical Variables
|
Description :
Exports lexical (\'my\') variables.
In the setup hashref, you can provide either non-reference values to define in the caller\'s lexical context, or you can provide initializers as coderefs.
Initializers are called with a reference to the variable which has been defined in the caller\'s lexical context. You can use that reference to not just assign it a value, but potentially mark the variable as read-only, or tie the variable, or whatever.
Lexical scalar, array and hash variables are each supported. In the case of arrays and hashes, providing \'undef\' in the setup hashref will initialize them to empty, but otherwise you must initialize them with an initializer coderef; not a non-reference scalar value.
Exporter-style \"tags\" may also be defined:
BEGIN { package MyVars; use Exporter::LexicalVars -setup => { \'$pi\' => sub { ... }, \'$e\' => sub { ... }, \':maths\' => [qw( $pi $e )], }; };
use MyVars qw( :maths ); use MyVars -maths; # this works too
A tag called \':all\' will be automatically set up for you. If your exporter is called without any arguments, then it will export a tag called \':default\' if it exists, or \':all\' otherwise.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-E/openSUSE_Tumbleweed/noarch |