Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kentnl/package-strictures
Facilitate toggling validation code at users request, without extra performance penalties.
https://github.com/kentnl/package-strictures
Last synced: 4 days ago
JSON representation
Facilitate toggling validation code at users request, without extra performance penalties.
- Host: GitHub
- URL: https://github.com/kentnl/package-strictures
- Owner: kentnl
- License: other
- Created: 2009-10-28T06:08:19.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2017-03-10T14:24:33.000Z (over 7 years ago)
- Last Synced: 2023-08-20T23:06:51.755Z (about 1 year ago)
- Language: Perl
- Homepage:
- Size: 167 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.mkdn
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
# NAME
Package::Strictures - Facilitate toggling validation code at users request, without extra performance penalties.
# VERSION
version 1.000002
# SYNOPSIS
## IMPLEMENTING MODULES
package Foo::Bar::Baz;
use Package::Strictures::Register -setup => {
-strictures => {
STRICT => {
default => ''
},
},
};if( STRICT ) {
/* Elimintated Code */
}See [`Package::Strictures::Register`](https://metacpan.org/pod/Package::Strictures::Register) for more detail.
## CONSUMING USERS
use Package::Strictures -for => {
'Foo::Bar::Baz' => {
'STRICT' => 1,
},
};use Foo::Bar::Baz;
/* Previously eliminated code now runs.
# DESCRIPTION
Often, I find myself in a bind, where I have code I want to do things properly, so it will detect
of its own accord ( at run time ) misuses of varying data-structures or methods, but the very same
tools that would be used to analyze and assure that things are going correctly, result in substantial
performance penalties.This module, and the infrastructure I hope builds on top of it, may hopefully provide an 'in' that lets me have the best of both
worlds, fast on the production server, and concise when trying to debug it ( that is, not having to manually desk-check the
whole execution cycle through various functions and modules just to find which level things are going wrong at ).In an ideal world, code would be both fast and concise, however, that is a future fantasy, and this here instead aims to
produce 80% of the same benefits, but now, instead of never.# MINOR WARNING
This code is pretty fresh. Its been done to death with T.D.D., and does everything I want it to, but there's always bugs.
# AUTHOR
Kent Fredric
# COPYRIGHT AND LICENSE
This software is copyright (c) 2017 by Kent Fredric .
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.