Name : perl-Exporter-Dispatch
| |
Version : 2.10
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : 8.66
| Date : 2024-08-05 17:44:52
|
Group : Development/Libraries/Perl
| Source RPM : perl-Exporter-Dispatch-2.10-8.66.src.rpm
|
Size : 0.01 MB
| |
Packager : (none)
| |
Summary : Exporter::Dispatch Perl module
|
Description :
Dispatch tables are great and convienient, but sometimes can be a bit of a pain to write. You have references flying over here and closures flying over there; yuck! Thats much too complicated for so simple of an idea. Wouldn\'t it be great if you could say \"Ok, I have a set of subs here, and I want a dispatch table that maps each subname to each sub... Go do it, Perl genie!\" With this short snippet of a module, now you can. Just throw your subs in a module, \'use Exporter::Dispatch;\', and a \'create_dptable\' subroutine that (surpise!) creates a dispatch table that maps each subname in the package to its corresponding sub will magically appear to serve you.
In a more serious tone, \'Exporter::Dispatch\' essentially creats a subroutine (named create_dptable) in namespaces it is imported to. This subroutine, when called, returns a hashref that maps a string of each subname to the corresponding subroutine. Subroutines that begin with an underscore are not added to the returned table, so they can be used as \"helper\" routines.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-E/openSUSE_Tumbleweed/noarch |