Struct::Dumb creates record-like structure types, similar to the struct keyword
in C, C++ or C#, or Record in Pascal. An invocation of this module will create a
construction function which returns new object references with the given field
values. These references all respond to lvalue methods that access or modify the
values stored.
It's specifically and intentionally not meant to be an object class. You cannot
subclass it. You cannot provide additional methods. You cannot apply roles or
mixins or metaclasses or traits or antlers or whatever else is in fashion this
week.
On the other hand, it is tiny, creates cheap lightweight array-backed
structures, uses nothing outside of core. It's intended simply to be a slightly
nicer way to store data structures, where otherwise you might be tempted to
abuse a hash, complete with the risk of typoing key names. The constructor will
croak if passed the wrong number of arguments, as will attempts to refer to
fields that don't exist.
This module does a compile-time code injection to let you define subroutine
aliases based on its name.
This differs from p5-Sub-Name in that it defines a typeglob in a more correct
way and keeps you from manipulating the symbols table directly. You can use
the subroutine as if it was defined the ordinary way then.
This is particularly useful in the cases when you need to have several
identical subroutines with different names.
The biggest benefit of Sub::Exporter over existing exporters (including the
ubiquitous Exporter.pm) is its ability to build new coderefs for export, rather
than to simply export code identical to that found in the exporting package.
Sub::Identify allows you to retrieve the real name of code references.
Checks whether the Manifest file matches the distro or not. To match a
distro the Manifest has to name all files that come along with the
distribution
Sub::Infix creates fake infix operators using overloading. It doesn't use source
filters, or Devel::Declare, or any of that magic. It's pure Perl, has no
non-core dependencies, and runs on Perl 5.8.
Perl6 allows multiple subs and methods with the same name, differing only in
their signature.
multi sub bar (Dog $foo) {?}
multi sub bar (Cat $foo) {?}
Dispatching will happen based on the runtime signature of the subroutine or
method call.
Sub::Override allows the programmer to simply name the sub to replace
and to supply a sub to replace it with.
my $override = Sub::Override->new('Some::sub', sub {'new data'});
# which is equivalent to:
my $override = Sub::Override->new;
$override->replace('Some::sub', sub { 'new data' });
One of the strongest complaints about Perl is its poor argument handling.
Simply passing everything in the @_ array is a serious limitation. This
module aims to rectify that.
With this module, we can specify subroutine signatures and automatically
dispatch on the number of arguments.
Pure Perl emulation of GNU tee