devel/p5-Class-Base 0.09nb9 NetBSD
Useful base class for deriving other modules
- System
- NetBSD
- Repository
- pkgsrc
- Maintainer
- [email protected]
- Last update
- Commit
618415630a- License
- gnu-gpl-v2 OR artistic
- Categories
- devel, perl5
- Package size
- 13.2 KiB, 43.7 KiB installed
Description
This module implements a simple base class from which other modules can be derived, thereby inheriting a number of useful methods such as new(), init(), params(), clone(), error() and debug().
For a number of years, I found myself re-writing this module for practically every Perl project of any significant size. Or rather, I would copy the module from the last project and perform a global search and replace to change the names. Each time it got a little more polished and eventually, I decided to Do The Right Thing and release it as a module in it's own right.
It doesn't pretend to be an all-encompassing solution for every kind of object creation problem you might encounter. In fact, it only supports blessed hash references that are created using the popular, but by no means universal convention of calling new() with a list or reference to a hash array of named parameters. Constructor failure is indicated by returning undef and setting the $ERROR package variable in the module's class to contain a relevant message (which you can also fetch by calling error() as a class method).
In the other systems
| System | Port | Version |
|---|---|---|
| NetBSD | devel/p5-Class-Base | 0.09nb9 |
| FreeBSD | devel/p5-Class-Base | 0.09 |
| OpenBSD | devel/p5-Class-Base | 0.09p0 |
| DragonFly | devel/p5-Class-Base | 0.09 |
| MidnightBSD | devel/p5-Class-Base | 0.09 |
| HardenedBSD | devel/p5-Class-Base | 0.09 |
| GhostBSD | devel/p5-Class-Base | 0.09 |
Install
Binary package:
pkgin install p5-Class-Base
From pkgsrc:
cd /usr/pkgsrc/devel/p5-Class-Base && make install clean
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | Version |
|---|---|
| NetBSD 10.1 x86_64 | 0.09nb9 |
| NetBSD 10.1 aarch64 | 0.09nb8 |
| SmartOS / illumos x86_64 | 0.09nb9 |
| macOS 15 arm64 | 0.09nb9 |