abw / badger Goto Github PK
View Code? Open in Web Editor NEWPerl application programming toolkit
Home Page: http://badgerpower.com/
Perl application programming toolkit
Home Page: http://badgerpower.com/
Howdy-do,
Is there a chance that a bugfix release could hit CPAN? A lot of installs of Badger are failing tests, ie:
t/app/app.t ................ Constants from lexical variables potentially modified elsewhere are deprecated at lib/Badger/Debug.pm line 109.
Which has a fix pushed and committed into this repo 846ff01
Badger is used in HTML::Query, which is used in CSS::Inliner which is awesome, but there's no Perl alternative to try, when things fail.
Appreciate if you could look into this.
I'm willing to do it myself, if you can authorize me as a maintainer (CPAN ID is: JJSIMONI)
Huge numbers of used only once warnings are generated when using Badger under perl 5.26.0
For example, the initial output of make test
for Badger is:-
PERL_DL_NONLAZY=1 "/opt/perlbrew/perls/perl-5.26.0/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/app/app.t t/class/alias.t t/class/config.t t/class/methods.t t/class/subclass.t t/class/vars.t t/codec/base64.t t/codec/codec.t t/codec/codecs.t t/codec/encode.t t/codec/encoding.t t/codec/html.t t/codec/json.t t/codec/storable.t t/codec/timestamp.t t/codec/tt.t t/codec/unicode.t t/codec/uri.t t/codec/url.t t/config/filesystem.t t/config/filesystem2.t t/core/base.t t/core/class.t t/core/config.t t/core/constants.t t/core/date.t t/core/debug.t t/core/dump.t t/core/exception.t t/core/exporter.t t/core/factory.t t/core/hub.t t/core/logic.t t/core/mixin.t t/core/modules.t t/core/prototype.t t/core/rainbow.t t/core/test.t t/core/timestamp.t t/core/trace.t t/core/url.t t/core/utils.t t/data/data.t t/data/facets.t t/data/list_facets.t t/data/number.t t/data/simple.t t/data/text.t t/data/text_facets.t t/data/type.t t/filesystem/codec.t t/filesystem/directory.t t/filesystem/encoding.t t/filesystem/file.t t/filesystem/filesystem.t t/filesystem/path.t t/filesystem/universal.t t/filesystem/virtual.t t/filesystem/visitor.t t/log/log.t t/log/logfile.t t/log/reporter.t t/misc/badger.t t/misc/duration.t t/misc/filter.t t/misc/moose.t t/pod/coverage.t t/pod/kwalitee.t t/storage/filesystem.t t/storage/memory.t t/storage/storages.t t/work/workplace.t t/work/workspace.t
Name "Badger::EXPORT_AFTER" used only once: possible typo at lib/Badger/Exporter.pm line 458.
Name "Badger::Test::EXPORTABLES" used only once: possible typo at lib/Badger/Exporter.pm line 381.
Name "Badger::Test::EXPORT_BEFORE" used only once: possible typo at lib/Badger/Exporter.pm line 449.
Name "Badger::Test::EXPORT_ANY" used only once: possible typo at lib/Badger/Exporter.pm line 406.
Name "Badger::Class::Methods::EXPORT_AFTER" used only once: possible typo at lib/Badger/Exporter.pm line 458.
Name "Badger::Class::Methods::EXPORT_BEFORE" used only once: possible typo at lib/Badger/Exporter.pm line 449.
Name "Badger::Class::Methods::EXPORT_ALL" used only once: possible typo at lib/Badger/Exporter.pm line 415.
Name "Badger::Class::Methods::EXPORT_ANY" used only once: possible typo at lib/Badger/Exporter.pm line 406.
Name "Badger::Class::Methods::EXPORTABLES" used only once: possible typo at lib/Badger/Exporter.pm line 381.
Name "Badger::Utils::EXPORT_AFTER" used only once: possible typo at lib/Badger/Exporter.pm line 458.
Name "Badger::Utils::EXPORT_BEFORE" used only once: possible typo at lib/Badger/Exporter.pm line 449.
Name "Badger::Utils::EXPORT_ALL" used only once: possible typo at lib/Badger/Exporter.pm line 415.
Name "Badger::Utils::EXPORT_HOOKS" used only once: possible typo at lib/Badger/Exporter.pm line 433.
Name "Badger::Constants::EXPORT_AFTER" used only once: possible typo at lib/Badger/Exporter.pm line 458.
Name "Badger::Constants::EXPORT_BEFORE" used only once: possible typo at lib/Badger/Exporter.pm line 449.
Name "Badger::Constants::EXPORT_ALL" used only once: possible typo at lib/Badger/Exporter.pm line 415.
Name "Badger::Constants::EXPORT_HOOKS" used only once: possible typo at lib/Badger/Exporter.pm line 433.
Name "Badger::Factory::Class::EXPORT_AFTER" used only once: possible typo at lib/Badger/Exporter.pm line 458.
Name "Badger::Factory::Class::EXPORT_ALL" used only once: possible typo at lib/Badger/Exporter.pm line 415.
Name "Badger::Factory::Class::EXPORT_HOOKS" used only once: possible typo at lib/Badger/Exporter.pm line 433.
Name "Badger::Factory::Class::EXPORTABLES" used only once: possible typo at lib/Badger/Exporter.pm line 381.
Name "Badger::Factory::EXPORTABLES" used only once: possible typo at lib/Badger/Exporter.pm line 381.
Name "Badger::EXPORT_BEFORE" used only once: possible typo at lib/Badger/Exporter.pm line 449.
Name "Badger::EXPORT_ALL" used only once: possible typo at lib/Badger/Exporter.pm line 415.
Name "Badger::EXPORT_ANY" used only once: possible typo at lib/Badger/Exporter.pm line 406.
Name "Badger::Filesystem::EXPORT_AFTER" used only once: possible typo at lib/Badger/Exporter.pm line 458.
Name "Badger::Filesystem::EXPORT_BEFORE" used only once: possible typo at lib/Badger/Exporter.pm line 449.
Name "Badger::Filesystem::Directory::EXPORT_AFTER" used only once: possible typo at lib/Badger/Exporter.pm line 458.
Name "Badger::Filesystem::Directory::EXPORT_BEFORE" used only once: possible typo at lib/Badger/Exporter.pm line 449.
Name "Badger::Filesystem::Directory::EXPORT_ALL" used only once: possible typo at lib/Badger/Exporter.pm line 415.
Name "Badger::Filesystem::Directory::EXPORT_ANY" used only once: possible typo at lib/Badger/Exporter.pm line 406.
Name "Badger::Filesystem::Directory::EXPORT_HOOKS" used only once: possible typo at lib/Badger/Exporter.pm line 433.
Name "Badger::Filesystem::Path::EXPORTABLES" used only once: possible typo at lib/Badger/Exporter.pm line 381.
Name "Badger::Filesystem::File::EXPORT_AFTER" used only once: possible typo at lib/Badger/Exporter.pm line 458.
Name "Badger::Filesystem::File::EXPORT_BEFORE" used only once: possible typo at lib/Badger/Exporter.pm line 449.
Name "Badger::Filesystem::File::EXPORT_ALL" used only once: possible typo at lib/Badger/Exporter.pm line 415.
Name "Badger::Filesystem::File::EXPORT_ANY" used only once: possible typo at lib/Badger/Exporter.pm line 406.
Name "Badger::Filesystem::File::EXPORT_HOOKS" used only once: possible typo at lib/Badger/Exporter.pm line 433.
Name "Badger::Filesystem::File::EXPORTABLES" used only once: possible typo at lib/Badger/Exporter.pm line 381.
Name "Badger::Filesystem::EXPORT_ALL" used only once: possible typo at lib/Badger/Exporter.pm line 415.
Name "Badger::Timestamp::EXPORT_AFTER" used only once: possible typo at lib/Badger/Exporter.pm line 458.
Name "Badger::Timestamp::EXPORTABLES" used only once: possible typo at lib/Badger/Exporter.pm line 381.
Name "Badger::Timestamp::EXPORT_BEFORE" used only once: possible typo at lib/Badger/Exporter.pm line 449.
Name "Badger::Timestamp::EXPORT_ALL" used only once: possible typo at lib/Badger/Exporter.pm line 415.
Name "Badger::Timestamp::EXPORT_HOOKS" used only once: possible typo at lib/Badger/Exporter.pm line 433.
Name "Badger::Exception::EXPORT_AFTER" used only once: possible typo at lib/Badger/Exporter.pm line 458.
Name "Badger::Exception::EXPORT_BEFORE" used only once: possible typo at lib/Badger/Exporter.pm line 449.
Name "Badger::Exception::EXPORT_ALL" used only once: possible typo at lib/Badger/Exporter.pm line 415.
Name "Badger::Exception::EXPORT_ANY" used only once: possible typo at lib/Badger/Exporter.pm line 406.
Name "Badger::Debug::EXPORT_AFTER" used only once: possible typo at lib/Badger/Exporter.pm line 458.
Name "Badger::Debug::EXPORT_BEFORE" used only once: possible typo at lib/Badger/Exporter.pm line 449.
Name "Badger::Debug::EXPORT_ALL" used only once: possible typo at lib/Badger/Exporter.pm line 415.
Name "Badger::Apps::EXPORT_AFTER" used only once: possible typo at lib/Badger/Exporter.pm line 458.
Name "Badger::Apps::EXPORT_HOOKS" used only once: possible typo at lib/Badger/Exporter.pm line 433.
Name "Badger::Apps::EXPORT_BEFORE" used only once: possible typo at lib/Badger/Exporter.pm line 449.
Name "Badger::Apps::EXPORT_ALL" used only once: possible typo at lib/Badger/Exporter.pm line 415.
Name "Badger::Apps::EXPORT_ANY" used only once: possible typo at lib/Badger/Exporter.pm line 406.
Name "Badger::Apps::EXPORTABLES" used only once: possible typo at lib/Badger/Exporter.pm line 381.
Name "Badger::Rainbow::EXPORT_AFTER" used only once: possible typo at lib/Badger/Exporter.pm line 458.
Name "Badger::Rainbow::EXPORT_BEFORE" used only once: possible typo at lib/Badger/Exporter.pm line 449.
Name "Badger::Rainbow::EXPORT_ALL" used only once: possible typo at lib/Badger/Exporter.pm line 415.
Name "Badger::EXPORTABLES" used only once: possible typo at lib/Badger/Exporter.pm line 381.
t/app/app.t ................ ok
Hey,
Badger::Codecs fails to compile with Perl v5.36:
puck@dirk:~/personal/RT/debian/Badger$ perl -Ilib -c lib/Badger/Codecs.pm
Bareword "CHAINED" not allowed while "strict subs" in use at lib/Badger/Codecs.pm line 60.
BEGIN not safe after errors--compilation aborted at lib/Badger/Codecs.pm line 139.
Compilation failed in require at lib/Badger/Codec/Chain.pm line 15.
BEGIN failed--compilation aborted at lib/Badger/Codec/Chain.pm line 15.
Compilation failed in require at lib/Badger/Codecs.pm line 16.
BEGIN failed--compilation aborted at lib/Badger/Codecs.pm line 16.
The test cases all pass though.
Hey,
According to the perldoc for Badger::Class::Methods, you should be able to use this module directly, however it fails to compile with Perl v5.36:
puck@dirk:~/personal/RT/debian/Badger$ perl -Ilib -c lib/Badger/Class/Methods.pm
Can't locate object method "mutators" via package "Badger::Class::Methods" at lib/Badger/Class.pm line 247.
BEGIN failed--compilation aborted at lib/Badger/Exception.pm line 44.
Compilation failed in require at lib/Badger/Base.pm line 28.
BEGIN failed--compilation aborted at lib/Badger/Base.pm line 28.
Compilation failed in require at (eval 6) line 1.
BEGIN failed--compilation aborted at (eval 6) line 1.
at lib/Badger/Class/Methods.pm line 26.
BEGIN failed--compilation aborted at lib/Badger/Class/Methods.pm line 36.
And if I cut'n'paste the example, it also fails to compile. Is that expected?
The test cases all pass though.
As of perl 5.26:
Exporter remained unchanged. But CORE support for the "used only once" warnings has been to restricted to the four magic names "EXPORT", "EXPORT_OK", "EXPORT_FAIL" and "EXPORT_TAGS". Other names starting with "EXPORT" will now throw the "used only once" warning as all other symbols.
$ perl -v
This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-thread-multi-ld
$ perl -MBadger -E ''
Name "Badger::Rainbow::EXPORT_AFTER" used only once: possible typo at /home/davecardwell/.perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/Badger/Exporter.pm line 458.
Name "Badger::Rainbow::EXPORT_ALL" used only once: possible typo at /home/davecardwell/.perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/Badger/Exporter.pm line 415.
Name "Badger::Rainbow::EXPORT_BEFORE" used only once: possible typo at /home/davecardwell/.perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/Badger/Exporter.pm line 449.
…
…
…
Name "Badger::Constants::EXPORT_ALL" used only once: possible typo at /home/davecardwell/.perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/Badger/Exporter.pm line 415.
Name "Badger::Constants::EXPORT_BEFORE" used only once: possible typo at /home/davecardwell/.perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/Badger/Exporter.pm line 449.
Name "Badger::Constants::EXPORT_HOOKS" used only once: possible typo at /home/davecardwell/.perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/Badger/Exporter.pm line 433.
Badger::Filesystem::File::directory
and Badger::Filesystem::File::parent
yield a Badger::Filesystem::Directory
that omits the File
's volume part. Example:
use Badger::Filesystem 'FS';
$file = FS->file('C:/path/to/file.txt'); # Badger::Filesystem::File
$file->path; # 'C:\path\to\file.txt', OK
$file->volume; # 'C:', OK
$dir = $file->directory; # Badger::Filesystem::Directory
$dir->path; # '\path\to\file.txt', NOK
$dir->volume; # '', NOK
$parent = $file->parent; # Badger::Filesystem::Directory
$parent->volume; # '', NOK
I think that File::directory
is intended to return only the directory part of the argument's path, as a scalar, similar to how File::volume
and File::name
return the argument path's volume and file name, respectively, as scalars. This is what http://badgerpower.com/docs/Badger/Filesystem/File.html#method_directory_dir_base suggests, though Badger::Filesystem::File
's POD says
$file->directory; # parent directory
which says "parent directory" rather than "directory part" -- which aren't equivalent.
And File::parent
(inherited from Path
) is intended to return an object representing the parent of the argument (says http://badgerpower.com/docs/Badger/Filesystem/Path.html#method_parent_skip_generations_up) -- which returned object should therefore include the volume part of the argument, but currently doesn't.
With these changes, File::directory
would return the directory part as a scalar, and File::parent
would returns a Directory
representing the parent directory of the argument, including the volume part.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.