Enable Perl warnings for plugins
This commit is contained in:
parent
da523f8daa
commit
a444512bf1
2 changed files with 14 additions and 1 deletions
14
UPGRADING.md
14
UPGRADING.md
|
@ -51,7 +51,7 @@ It is now possible to add products to products, which is done by specifying
|
||||||
product. This can be used for surcharges and discounts, or for bundles of
|
product. This can be used for surcharges and discounts, or for bundles of
|
||||||
products that can also be bought individually.
|
products that can also be bought individually.
|
||||||
|
|
||||||
### Eplicit contra accounts
|
### Explicit contra accounts
|
||||||
|
|
||||||
By default, products sold via the `products` plugin, are accounted on the
|
By default, products sold via the `products` plugin, are accounted on the
|
||||||
`+sales/products` contra account. This can now be overridden by specifying
|
`+sales/products` contra account. This can now be overridden by specifying
|
||||||
|
@ -77,6 +77,18 @@ would be crazy or wouldn't make sense in a self-service environment. RevBank
|
||||||
was too limited to support it properly, but I think current RevBank fulfills
|
was too limited to support it properly, but I think current RevBank fulfills
|
||||||
all requirements for making a better, proper pfand plugin.
|
all requirements for making a better, proper pfand plugin.
|
||||||
|
|
||||||
|
## Perl warnings are now enabled for plugins
|
||||||
|
|
||||||
|
If you get Perl warnings from a plugin, and don't want to fix the issues with
|
||||||
|
the code (or disagree with the warning), just add "no warnings;" to the top of
|
||||||
|
the plugin file. However, the warnings are often indicative of suboptimal code
|
||||||
|
that is ground for improvement!
|
||||||
|
|
||||||
|
Most warnings will be about unitialized (undefined) values. Some guidance for
|
||||||
|
Perl newbies: you can test whether something is defined with `if
|
||||||
|
(defined($foo)) { ... }`, or provide a default value with `$foo // "example
|
||||||
|
default value"`.
|
||||||
|
|
||||||
# (2022-08-30) RevBank 3.5
|
# (2022-08-30) RevBank 3.5
|
||||||
|
|
||||||
RevBank now has a simple built-in text editor for products and market;
|
RevBank now has a simple built-in text editor for products and market;
|
||||||
|
|
|
@ -52,6 +52,7 @@ sub load($class) {
|
||||||
}
|
}
|
||||||
RevBank::Eval::clean_eval(qq[
|
RevBank::Eval::clean_eval(qq[
|
||||||
use strict;
|
use strict;
|
||||||
|
use warnings;
|
||||||
use feature qw(signatures);
|
use feature qw(signatures);
|
||||||
no warnings 'experimental::signatures';
|
no warnings 'experimental::signatures';
|
||||||
package $package;
|
package $package;
|
||||||
|
|
Loading…
Add table
Reference in a new issue