MOP4Import::Opts - Object to encapsulate caller() record
# To import the type 'Opts' and m4i api functions. use MOP4Import::Opts; # To create an instance of MOP4Import::Opts. sub import { ... my Opts $opts = m4i_opts([caller]); ... } # To extract MOP4Import::Opts safely from pragma args. sub declare_foo { (my $myPack, my Opts $opts, my (@args)) = m4i_args(@_); ... }
This hash object encapsulates caller() info and other parameters for MOP4Import::Declare family.
scalar caller() of import in usual case.
Where to export. Always defined.
What to define. Optional.
What to inherit. Optional.
Used in MOP4Import::Types::Extend and MOP4Import::Declare::Type
Original caller() info. This may be empty for faked m4i_opts().
This function converts $_[1] by m4i_opts and returns whole @_.
$_[1]
@_
(my $myPack, my Opts $opts, my (@args)) = m4i_args(@_);
my Opts $opts = m4i_opts([caller]); my Opts $opts = m4i_opts(scalar caller); # string is ok too.
$opts->as_string; "$opts"; # Same as above.
Kobayashi, Hiroaki <hkoba@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install MOP4Import::Declare, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MOP4Import::Declare
CPAN shell
perl -MCPAN -e shell install MOP4Import::Declare
For more information on module installation, please visit the detailed CPAN module installation guide.