Subject: | XS-Parse-Sublike with "perl -w" emits warnings |
I sometimes check perl scripts by running "perl -wc script.pl".
Currently scripts that use XS::Parse::Sublike emit warnings:
```
❯ perl -MXS::Parse::Sublike -wce1
Name "XS::Parse::Sublike::REGISTER" used only once: possible typo at /Users/skaji/env/plenv/versions/5.30.3/lib/perl5/5.30.3/XSLoader.pm line 114.
Name "XS::Parse::Sublike::ABIVERSION" used only once: possible typo at /Users/skaji/env/plenv/versions/5.30.3/lib/perl5/5.30.3/XSLoader.pm line 114.
Name "XS::Parse::Sublike::PARSE" used only once: possible typo at /Users/skaji/env/plenv/versions/5.30.3/lib/perl5/5.30.3/XSLoader.pm line 114.
Name "XS::Parse::Sublike::PARSEANY" used only once: possible typo at /Users/skaji/env/plenv/versions/5.30.3/lib/perl5/5.30.3/XSLoader.pm line 114.
-e syntax OK
```
It it nice XS::Parse::Sublike suppresses these warnings.
An easy way to suppress these warnings seems to add "our" declaration:
```
diff --git lib/XS/Parse/Sublike.pm lib/XS/Parse/Sublike.pm
index 620de28..7b16d26 100644
--- lib/XS/Parse/Sublike.pm
+++ lib/XS/Parse/Sublike.pm
@@ -10,6 +10,11 @@ use warnings;
our $VERSION = '0.07';
+our $ABIVERSION;
+our $PARSE;
+our $REGISTER;
+our $PARSEANY;
+
require XSLoader;
XSLoader::load( __PACKAGE__, $VERSION );
```