Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package perl-Sub-HandlesVia for openSUSE:Factory checked in at 2022-07-04 11:32:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Sub-HandlesVia (Old) and /work/SRC/openSUSE:Factory/.perl-Sub-HandlesVia.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Sub-HandlesVia" Mon Jul 4 11:32:31 2022 rev:3 rq:986281 version:0.027 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Sub-HandlesVia/perl-Sub-HandlesVia.changes 2022-06-21 16:32:08.095786791 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Sub-HandlesVia.new.1548/perl-Sub-HandlesVia.changes 2022-07-04 11:32:35.743996149 +0200 @@ -1,0 +2,12 @@ +Thu Jun 30 03:06:38 UTC 2022 - Tina M??ller <timueller+p...@suse.de> + +- updated to 0.027 + see /usr/share/doc/packages/perl-Sub-HandlesVia/Changes + + 0.027 2022-06-30 + [ Test Suite ] + - Skip Mite test on Perl < 5.10.1 + 0.026 2022-06-30 + - Added: Support classes built with Mite. + +------------------------------------------------------------------- Old: ---- Sub-HandlesVia-0.025.tar.gz New: ---- Sub-HandlesVia-0.027.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Sub-HandlesVia.spec ++++++ --- /var/tmp/diff_new_pack.1x9ZjK/_old 2022-07-04 11:32:36.159996818 +0200 +++ /var/tmp/diff_new_pack.1x9ZjK/_new 2022-07-04 11:32:36.167996831 +0200 @@ -18,7 +18,7 @@ %define cpan_name Sub-HandlesVia Name: perl-Sub-HandlesVia -Version: 0.025 +Version: 0.027 Release: 0 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Alternative handles_via implementation ++++++ Sub-HandlesVia-0.025.tar.gz -> Sub-HandlesVia-0.027.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/COPYRIGHT new/Sub-HandlesVia-0.027/COPYRIGHT --- old/Sub-HandlesVia-0.025/COPYRIGHT 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/COPYRIGHT 2022-06-30 02:08:51.000000000 +0200 @@ -72,6 +72,7 @@ lib/Sub/HandlesVia/HandlerLibrary/Number.pm lib/Sub/HandlesVia/HandlerLibrary/Scalar.pm lib/Sub/HandlesVia/HandlerLibrary/String.pm + lib/Sub/HandlesVia/Toolkit/Mite.pm lib/Sub/HandlesVia/Toolkit/Moo.pm lib/Sub/HandlesVia/Toolkit/Moose.pm lib/Sub/HandlesVia/Toolkit/Mouse.pm @@ -96,6 +97,8 @@ t/30egpod/number.t t/30egpod/scalar.t t/30egpod/string.t + t/40mite/lib/MyTest.pm + t/40mite/lib/MyTest.pm.mite.pm t/94cmp.t t/96foreach.t t/99headtail.t @@ -126,11 +129,13 @@ Files: t/20moosex_extended.t t/31egpod_dummy.t + t/40mite/basic.t Copyright: This software is copyright (c) 2022 by Toby Inkster. License: GPL-1.0+ or Artistic-1.0 Files: INSTALL LICENSE + t/40mite/.mite/config Copyright: Unknown License: Unknown @@ -138,6 +143,11 @@ Copyright: This software is copyright (c) 2020 by Toby Inkster. License: GPL-1.0+ or Artistic-1.0 +Files: t/40mite/lib/MyTest/Mite.pm +Copyright: This software is copyright (c) 2011-2014 by Michael G Schwern. + This software is copyright (c) 2022 by Toby Inkster. +License: GPL-1.0+ or Artistic-1.0 + License: Artistic-1.0 This software is Copyright (c) 2022 by the copyright holder(s). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/Changes new/Sub-HandlesVia-0.027/Changes --- old/Sub-HandlesVia-0.025/Changes 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/Changes 2022-06-30 02:08:51.000000000 +0200 @@ -6,6 +6,15 @@ Bug tracker: <https://github.com/tobyink/p5-sub-handlesvia/issues> Maintainer: Toby Inkster (TOBYINK) <toby...@cpan.org> +0.027 2022-06-30 + + [ Test Suite ] + - Skip Mite test on Perl < 5.10.1 + +0.026 2022-06-30 + + - Added: Support classes built with Mite. + 0.025 2022-06-16 - Internally shift off the method invocant sometimes as benchmarking shows diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/MANIFEST new/Sub-HandlesVia-0.027/MANIFEST --- old/Sub-HandlesVia-0.025/MANIFEST 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/MANIFEST 2022-06-30 02:08:51.000000000 +0200 @@ -32,6 +32,7 @@ lib/Sub/HandlesVia/HandlerLibrary/String.pm lib/Sub/HandlesVia/HandlerLibrary/String.pod lib/Sub/HandlesVia/Toolkit.pm +lib/Sub/HandlesVia/Toolkit/Mite.pm lib/Sub/HandlesVia/Toolkit/Moo.pm lib/Sub/HandlesVia/Toolkit/Moose.pm lib/Sub/HandlesVia/Toolkit/Mouse.pm @@ -107,6 +108,11 @@ t/30egpod/scalar.t t/30egpod/string.t t/31egpod_dummy.t +t/40mite/.mite/config +t/40mite/basic.t +t/40mite/lib/MyTest.pm +t/40mite/lib/MyTest.pm.mite.pm +t/40mite/lib/MyTest/Mite.pm t/94cmp.t t/95any.t t/96foreach.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/META.json new/Sub-HandlesVia-0.027/META.json --- old/Sub-HandlesVia-0.025/META.json 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/META.json 2022-06-30 02:08:51.000000000 +0200 @@ -72,95 +72,99 @@ "provides" : { "Sub::HandlesVia" : { "file" : "lib/Sub/HandlesVia.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::CodeGenerator" : { "file" : "lib/Sub/HandlesVia/CodeGenerator.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::Handler" : { "file" : "lib/Sub/HandlesVia/Handler.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::Handler::CodeRef" : { "file" : "lib/Sub/HandlesVia/Handler.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::Handler::Traditional" : { "file" : "lib/Sub/HandlesVia/Handler.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::HandlerLibrary" : { "file" : "lib/Sub/HandlesVia/HandlerLibrary.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::HandlerLibrary::Array" : { "file" : "lib/Sub/HandlesVia/HandlerLibrary/Array.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::HandlerLibrary::Bool" : { "file" : "lib/Sub/HandlesVia/HandlerLibrary/Bool.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::HandlerLibrary::Code" : { "file" : "lib/Sub/HandlesVia/HandlerLibrary/Code.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::HandlerLibrary::Counter" : { "file" : "lib/Sub/HandlesVia/HandlerLibrary/Counter.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::HandlerLibrary::Hash" : { "file" : "lib/Sub/HandlesVia/HandlerLibrary/Hash.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::HandlerLibrary::Number" : { "file" : "lib/Sub/HandlesVia/HandlerLibrary/Number.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::HandlerLibrary::Scalar" : { "file" : "lib/Sub/HandlesVia/HandlerLibrary/Scalar.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::HandlerLibrary::String" : { "file" : "lib/Sub/HandlesVia/HandlerLibrary/String.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::Toolkit" : { "file" : "lib/Sub/HandlesVia/Toolkit.pm", - "version" : "0.025" + "version" : "0.027" + }, + "Sub::HandlesVia::Toolkit::Mite" : { + "file" : "lib/Sub/HandlesVia/Toolkit/Mite.pm", + "version" : "0.027" }, "Sub::HandlesVia::Toolkit::Moo" : { "file" : "lib/Sub/HandlesVia/Toolkit/Moo.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::Toolkit::Moose" : { "file" : "lib/Sub/HandlesVia/Toolkit/Moose.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::Toolkit::Moose::PackageTrait" : { "file" : "lib/Sub/HandlesVia/Toolkit/Moose.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::Toolkit::Moose::RoleTrait" : { "file" : "lib/Sub/HandlesVia/Toolkit/Moose.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::Toolkit::Mouse" : { "file" : "lib/Sub/HandlesVia/Toolkit/Mouse.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::Toolkit::Mouse::PackageTrait" : { "file" : "lib/Sub/HandlesVia/Toolkit/Mouse.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::Toolkit::Mouse::RoleTrait" : { "file" : "lib/Sub/HandlesVia/Toolkit/Mouse.pm", - "version" : "0.025" + "version" : "0.027" }, "Sub::HandlesVia::Toolkit::Plain" : { "file" : "lib/Sub/HandlesVia/Toolkit/Plain.pm", - "version" : "0.025" + "version" : "0.027" } }, "release_status" : "stable", @@ -179,7 +183,7 @@ }, "x_identifier" : "http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/project" }, - "version" : "0.025", - "x_serialization_backend" : "JSON::PP version 4.06", + "version" : "0.027", + "x_serialization_backend" : "JSON::PP version 4.09", "x_static_install" : 1 } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/META.yml new/Sub-HandlesVia-0.027/META.yml --- old/Sub-HandlesVia-0.025/META.yml 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/META.yml 2022-06-30 02:08:51.000000000 +0200 @@ -28,73 +28,76 @@ provides: Sub::HandlesVia: file: lib/Sub/HandlesVia.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::CodeGenerator: file: lib/Sub/HandlesVia/CodeGenerator.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::Handler: file: lib/Sub/HandlesVia/Handler.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::Handler::CodeRef: file: lib/Sub/HandlesVia/Handler.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::Handler::Traditional: file: lib/Sub/HandlesVia/Handler.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::HandlerLibrary: file: lib/Sub/HandlesVia/HandlerLibrary.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::HandlerLibrary::Array: file: lib/Sub/HandlesVia/HandlerLibrary/Array.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::HandlerLibrary::Bool: file: lib/Sub/HandlesVia/HandlerLibrary/Bool.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::HandlerLibrary::Code: file: lib/Sub/HandlesVia/HandlerLibrary/Code.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::HandlerLibrary::Counter: file: lib/Sub/HandlesVia/HandlerLibrary/Counter.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::HandlerLibrary::Hash: file: lib/Sub/HandlesVia/HandlerLibrary/Hash.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::HandlerLibrary::Number: file: lib/Sub/HandlesVia/HandlerLibrary/Number.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::HandlerLibrary::Scalar: file: lib/Sub/HandlesVia/HandlerLibrary/Scalar.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::HandlerLibrary::String: file: lib/Sub/HandlesVia/HandlerLibrary/String.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::Toolkit: file: lib/Sub/HandlesVia/Toolkit.pm - version: '0.025' + version: '0.027' + Sub::HandlesVia::Toolkit::Mite: + file: lib/Sub/HandlesVia/Toolkit/Mite.pm + version: '0.027' Sub::HandlesVia::Toolkit::Moo: file: lib/Sub/HandlesVia/Toolkit/Moo.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::Toolkit::Moose: file: lib/Sub/HandlesVia/Toolkit/Moose.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::Toolkit::Moose::PackageTrait: file: lib/Sub/HandlesVia/Toolkit/Moose.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::Toolkit::Moose::RoleTrait: file: lib/Sub/HandlesVia/Toolkit/Moose.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::Toolkit::Mouse: file: lib/Sub/HandlesVia/Toolkit/Mouse.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::Toolkit::Mouse::PackageTrait: file: lib/Sub/HandlesVia/Toolkit/Mouse.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::Toolkit::Mouse::RoleTrait: file: lib/Sub/HandlesVia/Toolkit/Mouse.pm - version: '0.025' + version: '0.027' Sub::HandlesVia::Toolkit::Plain: file: lib/Sub/HandlesVia/Toolkit/Plain.pm - version: '0.025' + version: '0.027' recommends: Sub::Util: '0' requires: @@ -114,6 +117,6 @@ homepage: https://metacpan.org/release/Sub-HandlesVia license: http://dev.perl.org/licenses/ repository: git://github.com/tobyink/p5-sub-handlesvia.git -version: '0.025' +version: '0.027' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' x_static_install: 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/Makefile.PL new/Sub-HandlesVia-0.027/Makefile.PL --- old/Sub-HandlesVia-0.025/Makefile.PL 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/Makefile.PL 2022-06-30 02:08:51.000000000 +0200 @@ -52,53 +52,54 @@ }, }, "provides" => { - "Sub::HandlesVia" => { file => "lib/Sub/HandlesVia.pm", version => 0.025 }, - "Sub::HandlesVia::CodeGenerator" => { file => "lib/Sub/HandlesVia/CodeGenerator.pm", version => 0.025 }, - "Sub::HandlesVia::Handler" => { file => "lib/Sub/HandlesVia/Handler.pm", version => 0.025 }, - "Sub::HandlesVia::Handler::CodeRef" => { file => "lib/Sub/HandlesVia/Handler.pm", version => 0.025 }, - "Sub::HandlesVia::Handler::Traditional" => { file => "lib/Sub/HandlesVia/Handler.pm", version => 0.025 }, - "Sub::HandlesVia::HandlerLibrary" => { file => "lib/Sub/HandlesVia/HandlerLibrary.pm", version => 0.025 }, + "Sub::HandlesVia" => { file => "lib/Sub/HandlesVia.pm", version => 0.027 }, + "Sub::HandlesVia::CodeGenerator" => { file => "lib/Sub/HandlesVia/CodeGenerator.pm", version => 0.027 }, + "Sub::HandlesVia::Handler" => { file => "lib/Sub/HandlesVia/Handler.pm", version => 0.027 }, + "Sub::HandlesVia::Handler::CodeRef" => { file => "lib/Sub/HandlesVia/Handler.pm", version => 0.027 }, + "Sub::HandlesVia::Handler::Traditional" => { file => "lib/Sub/HandlesVia/Handler.pm", version => 0.027 }, + "Sub::HandlesVia::HandlerLibrary" => { file => "lib/Sub/HandlesVia/HandlerLibrary.pm", version => 0.027 }, "Sub::HandlesVia::HandlerLibrary::Array" => { file => "lib/Sub/HandlesVia/HandlerLibrary/Array.pm", - version => 0.025, + version => 0.027, }, "Sub::HandlesVia::HandlerLibrary::Bool" => { file => "lib/Sub/HandlesVia/HandlerLibrary/Bool.pm", - version => 0.025, + version => 0.027, }, "Sub::HandlesVia::HandlerLibrary::Code" => { file => "lib/Sub/HandlesVia/HandlerLibrary/Code.pm", - version => 0.025, + version => 0.027, }, "Sub::HandlesVia::HandlerLibrary::Counter" => { file => "lib/Sub/HandlesVia/HandlerLibrary/Counter.pm", - version => 0.025, + version => 0.027, }, "Sub::HandlesVia::HandlerLibrary::Hash" => { file => "lib/Sub/HandlesVia/HandlerLibrary/Hash.pm", - version => 0.025, + version => 0.027, }, "Sub::HandlesVia::HandlerLibrary::Number" => { file => "lib/Sub/HandlesVia/HandlerLibrary/Number.pm", - version => 0.025, + version => 0.027, }, "Sub::HandlesVia::HandlerLibrary::Scalar" => { file => "lib/Sub/HandlesVia/HandlerLibrary/Scalar.pm", - version => 0.025, + version => 0.027, }, "Sub::HandlesVia::HandlerLibrary::String" => { file => "lib/Sub/HandlesVia/HandlerLibrary/String.pm", - version => 0.025, + version => 0.027, }, - "Sub::HandlesVia::Toolkit" => { file => "lib/Sub/HandlesVia/Toolkit.pm", version => 0.025 }, - "Sub::HandlesVia::Toolkit::Moo" => { file => "lib/Sub/HandlesVia/Toolkit/Moo.pm", version => 0.025 }, - "Sub::HandlesVia::Toolkit::Moose" => { file => "lib/Sub/HandlesVia/Toolkit/Moose.pm", version => 0.025 }, - "Sub::HandlesVia::Toolkit::Moose::PackageTrait" => { file => "lib/Sub/HandlesVia/Toolkit/Moose.pm", version => 0.025 }, - "Sub::HandlesVia::Toolkit::Moose::RoleTrait" => { file => "lib/Sub/HandlesVia/Toolkit/Moose.pm", version => 0.025 }, - "Sub::HandlesVia::Toolkit::Mouse" => { file => "lib/Sub/HandlesVia/Toolkit/Mouse.pm", version => 0.025 }, - "Sub::HandlesVia::Toolkit::Mouse::PackageTrait" => { file => "lib/Sub/HandlesVia/Toolkit/Mouse.pm", version => 0.025 }, - "Sub::HandlesVia::Toolkit::Mouse::RoleTrait" => { file => "lib/Sub/HandlesVia/Toolkit/Mouse.pm", version => 0.025 }, - "Sub::HandlesVia::Toolkit::Plain" => { file => "lib/Sub/HandlesVia/Toolkit/Plain.pm", version => 0.025 }, + "Sub::HandlesVia::Toolkit" => { file => "lib/Sub/HandlesVia/Toolkit.pm", version => 0.027 }, + "Sub::HandlesVia::Toolkit::Mite" => { file => "lib/Sub/HandlesVia/Toolkit/Mite.pm", version => 0.027 }, + "Sub::HandlesVia::Toolkit::Moo" => { file => "lib/Sub/HandlesVia/Toolkit/Moo.pm", version => 0.027 }, + "Sub::HandlesVia::Toolkit::Moose" => { file => "lib/Sub/HandlesVia/Toolkit/Moose.pm", version => 0.027 }, + "Sub::HandlesVia::Toolkit::Moose::PackageTrait" => { file => "lib/Sub/HandlesVia/Toolkit/Moose.pm", version => 0.027 }, + "Sub::HandlesVia::Toolkit::Moose::RoleTrait" => { file => "lib/Sub/HandlesVia/Toolkit/Moose.pm", version => 0.027 }, + "Sub::HandlesVia::Toolkit::Mouse" => { file => "lib/Sub/HandlesVia/Toolkit/Mouse.pm", version => 0.027 }, + "Sub::HandlesVia::Toolkit::Mouse::PackageTrait" => { file => "lib/Sub/HandlesVia/Toolkit/Mouse.pm", version => 0.027 }, + "Sub::HandlesVia::Toolkit::Mouse::RoleTrait" => { file => "lib/Sub/HandlesVia/Toolkit/Mouse.pm", version => 0.027 }, + "Sub::HandlesVia::Toolkit::Plain" => { file => "lib/Sub/HandlesVia/Toolkit/Plain.pm", version => 0.027 }, }, "release_status" => "stable", "resources" => { @@ -112,7 +113,7 @@ }, x_identifier => "http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/project", }, - "version" => 0.025, + "version" => 0.027, "x_static_install" => 1, }; @@ -125,7 +126,7 @@ VERSION => $meta->{version}, EXE_FILES => [ map $_->{file}, values %{ $meta->{x_provides_scripts} || {} } ], NAME => do { my $n = $meta->{name}; $n =~ s/-/::/g; $n }, - test => { TESTS => "t/*.t t/02moo/*.t t/03moo_mxtt/*.t t/04moose/*.t t/05moose_nativetypes/*.t t/06mouse/*.t t/07mouse_nativetypes/*.t t/30egpod/*.t" }, + test => { TESTS => "t/*.t t/02moo/*.t t/03moo_mxtt/*.t t/04moose/*.t t/05moose_nativetypes/*.t t/06mouse/*.t t/07mouse_nativetypes/*.t t/30egpod/*.t t/40mite/*.t" }, %dynamic_config, ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/README new/Sub-HandlesVia-0.027/README --- old/Sub-HandlesVia-0.025/README 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/README 2022-06-30 02:08:51.000000000 +0200 @@ -185,6 +185,26 @@ (If you have a moose in your kitchen, that might be even worse than the mouse.) + Using with Mite + You should be able to use Sub::HandlesVia with Mite 0.001011 or above. + Your project will still have a dependency on Sub::HandlesVia. + + package MyApp::Kitchen { + use MyApp::Mite; + use Sub::HandlesVia; + + has food => ( + is => 'ro', + isa => 'ArrayRef[Str]', + handles_via => 'Array', + default => sub { [] }, + handles => { + 'add_food' => 'push', + 'find_food' => 'grep', + }, + ); + } + Using with Anything For Moose and Mouse, Sub::HandlesVia can use their metaobject protocols to grab an attribute's definition and install the methods it needs to. For diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/SIGNATURE new/Sub-HandlesVia-0.027/SIGNATURE --- old/Sub-HandlesVia-0.025/SIGNATURE 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/SIGNATURE 2022-06-30 02:08:51.000000000 +0200 @@ -14,43 +14,44 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 -SHA256 e71ac582d6e20911692259a487e373113f83e6e769ba85212efc70025a030e56 COPYRIGHT +SHA256 9329676fd1e3f8631b9c3cacce1e66c22048c69ea5d189fc5c1e79d4a5bfec6b COPYRIGHT SHA256 7977c02e031153dc91d6db9d2e803671d586e59bca2c5c3dc6211f29c04d92d6 CREDITS -SHA256 e9a2a43d884cb5297d02505597709c09bf4a8a53799a4e78a394fae9c9058767 Changes +SHA256 178466c93b9511fc8cbf50b1348a16f258d6bb527ad454a7ae2230efee4d332a Changes SHA256 35bc6e48ae9f06aba42a170044f623d625a4825b6c1d960959ee0e286d5e8732 INSTALL SHA256 a4f85c6f4d6e8bdd37b7ab08013e3e3bee1fe8e910e20f8f54d5025ffe40f384 LICENSE -SHA256 2751900f3474a3c5991fae13e049b0e4947ee9270cdc826baa2c9b26ddd6c743 MANIFEST -SHA256 45d4b345b754c6ce3570fe36ad8653640058388f7d6e0a5ca5fae821c3e271b0 META.json -SHA256 1488dd724007c1c143705546f8e2ed58fe1d72246292aa77187d41bbb9bbda6d META.yml -SHA256 7134fe3e6fe8aa12ea014a0326ce20d8f17c916272768c7b0a5e6ebbe9488ddd Makefile.PL -SHA256 27f9973af6d6ca0d4b2ed57e5bd332b385d208bb1f91cfac67309d0ae27359b0 README +SHA256 1d5d1e7c5601df48bd8e8de9174078a311b3aa758b917bcfb276d3b6a03706a4 MANIFEST +SHA256 87fbe171bb848987945bbc8101a2409fccc2cffa2c1d119def85d6a9b8303224 META.json +SHA256 65506320ed5c35a110709380dd508fca2dd9e55c28e37c1efce1cf43af36a011 META.yml +SHA256 9a353c65faccf4f94ffb16a32c47ee795b339c891dd964004ac6b31f0e0a83ec Makefile.PL +SHA256 2c90bb2f57a12f21034430caff85c6d353c1dada62ab63d3e0b6a749ff74ebe8 README SHA256 19f3f459b9cfea0def44f03009e61bb836505472ebf33ff33082885276d4681c dist.ini -SHA256 9338678c431ed6e33623e36632d74774a5eeddd5916d787e00683774f065f9e2 doap.ttl -SHA256 4855f7f3dcc5e9381934411df17ed982eb6c15bb466fa2964bee2b5afc92fd1f lib/Sub/HandlesVia.pm -SHA256 24020ed6c0536178e92f13fc6ab8d2b28f5ecaebe6f8b07e8348b2e24b422526 lib/Sub/HandlesVia/CodeGenerator.pm -SHA256 f3c0237716657a787a1574207b3c87e174234400c064b5144a3fe39096841788 lib/Sub/HandlesVia/Handler.pm -SHA256 37455533792eff3f608be08b8d4a21b6dd95f111bd4ef241413fd42dea27ef6e lib/Sub/HandlesVia/HandlerLibrary.pm -SHA256 500158a686e0476065af85c3cc28c155f51c1a0418061edec78e6f91f7bf7ad3 lib/Sub/HandlesVia/HandlerLibrary/Array.pm +SHA256 dfd6d78dd711b8cfa89dec2134b6324303a345f136d74b88704ef3a18004d8c6 doap.ttl +SHA256 d3bb5dc767de6e8d5e98b53ebc44e984367a29db8da56ad64ab5c2bc4f3a717b lib/Sub/HandlesVia.pm +SHA256 f1201c7a425a04723d878ddfc5e34a1e9e89945ec51eaba32d6fb74aea308faf lib/Sub/HandlesVia/CodeGenerator.pm +SHA256 740356033c088c4a8f7d8569e16c3ce73c60e7ff13e276d19b1934b9c449f300 lib/Sub/HandlesVia/Handler.pm +SHA256 740cf918c094788c2f58bdafc430e8239b64719647f8a8f254e5697856580feb lib/Sub/HandlesVia/HandlerLibrary.pm +SHA256 78cf143c719e2dd981789a63497262f8a4ab02fe3f35b771d4bbeb032f127532 lib/Sub/HandlesVia/HandlerLibrary/Array.pm SHA256 4cbe4e322399bf35f4c57b6eeacc20599989b9ec963e2bef5c9e51d7bdcc30d3 lib/Sub/HandlesVia/HandlerLibrary/Array.pod -SHA256 92bcac7f0b84996b5b7f4e3d4f7300827ed94a00f9caf14e885f4a13200b9c79 lib/Sub/HandlesVia/HandlerLibrary/Bool.pm +SHA256 f92acdcff395d8c164b8fda17948af79d357a6af16c6a45e37427d5c158a36e9 lib/Sub/HandlesVia/HandlerLibrary/Bool.pm SHA256 b364df1453e94807beab1bf7aa59ede52f6278b89467d7ef211a13eed91e1d6b lib/Sub/HandlesVia/HandlerLibrary/Bool.pod -SHA256 e54f786a89edb2d392c680996c41369cea46866bb8c2aa1ff47b2b47537c71ce lib/Sub/HandlesVia/HandlerLibrary/Code.pm +SHA256 75fdbd72eacf5154d33b2ec40be81841f4ae63e8e8bd1753334f5d837bce0ce3 lib/Sub/HandlesVia/HandlerLibrary/Code.pm SHA256 3d3dfbc8071576af7921fc86a406505a782667d8df05e6b868ec5ca96811ef79 lib/Sub/HandlesVia/HandlerLibrary/Code.pod -SHA256 00e090cd5f6fdc335971f6717ce4cba90761877ea88771d699b481f393b842ff lib/Sub/HandlesVia/HandlerLibrary/Counter.pm +SHA256 6783923ccc2f269c729e3815026b2ecc274b90bb645004d23e667b5ce4e9cf5c lib/Sub/HandlesVia/HandlerLibrary/Counter.pm SHA256 0e4960e3e6bf46c6043da8d1dee8dc46c94b073bb997ef73195391bff9f8323f lib/Sub/HandlesVia/HandlerLibrary/Counter.pod -SHA256 7909dea6579d46813f2b5db177b95d4e73aa6922254b8089a9d65fc4d8cd3f15 lib/Sub/HandlesVia/HandlerLibrary/Hash.pm +SHA256 bf285f6df0b47ef550ff91975213b512cfafe20956a4c1600e831c69d14ed898 lib/Sub/HandlesVia/HandlerLibrary/Hash.pm SHA256 60f3595bb3ab77420948e04272d2c5089cda1e04a0a4a53fe1c9a18c120849d3 lib/Sub/HandlesVia/HandlerLibrary/Hash.pod -SHA256 b652a02bea9ff4952015907ec61458e0bf3deb262b8ef8fa8dbd9f5635f2c9e1 lib/Sub/HandlesVia/HandlerLibrary/Number.pm +SHA256 ffe113e32e2a072eaee3e46ec0e3a682330637e681ea9ec708e74e77f03bd3a0 lib/Sub/HandlesVia/HandlerLibrary/Number.pm SHA256 63e76521c76c1d15cce086eebc636b408342afa20fa863f2f5d27e2c1b4aba91 lib/Sub/HandlesVia/HandlerLibrary/Number.pod -SHA256 a2ed81094b9910ee04f04fae1aaee79e3eb8f8bd8f6fb5f8928c8febbc878b81 lib/Sub/HandlesVia/HandlerLibrary/Scalar.pm +SHA256 d5c992dd2be00bbc7026ffeaa8d2cb464d97248bbf9c1977d07bc225fc678916 lib/Sub/HandlesVia/HandlerLibrary/Scalar.pm SHA256 f729f7562a305cbd9d566aa9dda983370d4ff64f284ac8b548ae2c1436a021ef lib/Sub/HandlesVia/HandlerLibrary/Scalar.pod -SHA256 aafa473397adbad6836ae1eeb5990c812b66e2ef8435487640bb1e601a076f87 lib/Sub/HandlesVia/HandlerLibrary/String.pm +SHA256 97dd193c1e988e2be5a18e58e2a0fb2ba51644baaa0a74cc8ba9ac966a756121 lib/Sub/HandlesVia/HandlerLibrary/String.pm SHA256 9a16dde746b64d01b18082ca8cca24571865bcdced3e161fddaa68768d737e04 lib/Sub/HandlesVia/HandlerLibrary/String.pod -SHA256 61a58deaeaf5b30ddcba9b8d862c9a45a6d2e57ac20b1c4f7edcf90371411871 lib/Sub/HandlesVia/Toolkit.pm -SHA256 f08579d59d75c6e9861b4cc9aeddc4d30aeeed7828ab7f3989bad4cfde8ac184 lib/Sub/HandlesVia/Toolkit/Moo.pm -SHA256 15f394d9c73cfd302492240954ab9bcb1538295c2851567d59f104ea3ad6c2a1 lib/Sub/HandlesVia/Toolkit/Moose.pm -SHA256 e7f815d7bb6be9b2171b9938749bc16d9c1bd780a5842289e853f1f98cbf1e22 lib/Sub/HandlesVia/Toolkit/Mouse.pm -SHA256 21b8282ce62d604c9679e67e70ae6beb5bf3fd745bf682aa9249128120f052db lib/Sub/HandlesVia/Toolkit/Plain.pm +SHA256 72a246612cf1fb7813572a7272d3595270a94dce53e2aa8797c37580c79a74d2 lib/Sub/HandlesVia/Toolkit.pm +SHA256 47664509e0a2293e223fa20d3a1a87a710dcbb388d81e60c790171a02ba1dee7 lib/Sub/HandlesVia/Toolkit/Mite.pm +SHA256 cded22f230bd664b4099e4550c6ac7e9eaac71c70fe0304ee12dc6be5ee10dec lib/Sub/HandlesVia/Toolkit/Moo.pm +SHA256 28d42d9bb26634e31039285690df7325023055bc26138f56fa7aeeeb6b22591a lib/Sub/HandlesVia/Toolkit/Moose.pm +SHA256 79929aa0f5eed31d1d01f77d684cdc4c625141d1ac1a704bc6ee4f12fe00c957 lib/Sub/HandlesVia/Toolkit/Mouse.pm +SHA256 5aa6f232da426bf99d3d1cc0c61ed01fe559e1df3452950d48dade8ca5bcfa3b lib/Sub/HandlesVia/Toolkit/Plain.pm SHA256 2078046dd5726576304630c6f0ff72da1b938007a1cb49429327b569e689f81c t/00begin.t SHA256 5be3d6935e48a88ff74c38cd8a03e911b2f3d4f49ac639246e40b1e88e8fcb32 t/01basic.t SHA256 345d5ded3095f416270828ff24316643c1358172a49c6984694085e91eadd611 t/02moo.t @@ -122,6 +123,11 @@ SHA256 fbc667741d6c338fdc55320066732f307695ee0a9016319598898f406ebe9a01 t/30egpod/scalar.t SHA256 ae267058620cc77af8aedf98cc35ad449d758fd87cea428a3dec998f1a456b7d t/30egpod/string.t SHA256 5c554a286988e45bf3b265183015573be57e07b1fdc8f3d31e6adfaf4f0629a4 t/31egpod_dummy.t +SHA256 be2ea3f2f766193b9f3458abf20c75bd0668311056f86950375e7a15c95796df t/40mite/.mite/config +SHA256 2f86e8781d7048e7207cf5dc5a204eed46de1bc126582df488920af2c7ba8140 t/40mite/basic.t +SHA256 16be70f8200bf3cd729ecfc162c4a22c50c293ad54ec840186bc48beb5523585 t/40mite/lib/MyTest.pm +SHA256 54d9c4ece57511310f8b52e16d8e5ef39f8c0eff3e5593f7ac3c2e0438a0538c t/40mite/lib/MyTest.pm.mite.pm +SHA256 cab00f8e4e0803935eb28a19fa8e30ab9b085432ab8d39587bfdec40ca3b5abb t/40mite/lib/MyTest/Mite.pm SHA256 3dc956219599a77e77a038efcc753a822d57646ffdda8109433df635d7cf79f3 t/94cmp.t SHA256 c2b7cf16e9eab452e875e0303e5f4e7722d69ba4d5ada363caff9e807cfaa67c t/95any.t SHA256 f393205104cde3e714e7a078b801fed222fd941a366c2d9acde59e6ca93e282e t/96foreach.t @@ -130,7 +136,7 @@ SHA256 e7ac6a8eb214f919ddb67cb5ec0810b0f80719f6fe09d3123dcbf19b1b0a742e t/99headtail.t -----BEGIN PGP SIGNATURE----- -iF0EAREDAB0WIQRVJKj/4+s6z4WzNujOv4Eoaip9OQUCYqsHRQAKCRDOv4Eoaip9 -OSpOAJ9anpnILhYj06U4kjv5swgP0a688QCeP4NAdP1SV5pDFn4C4SP6BOOmu2U= -=Eel0 +iF0EAREDAB0WIQRVJKj/4+s6z4WzNujOv4Eoaip9OQUCYrzpkwAKCRDOv4Eoaip9 +OYxlAKChGuADgOAYPIn5j+Mg5eARp2JCRQCdE8jHljDsOrTJNjsANl8dARw8q9I= +=f50o -----END PGP SIGNATURE----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/doap.ttl new/Sub-HandlesVia-0.027/doap.ttl --- old/Sub-HandlesVia-0.025/doap.ttl 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/doap.ttl 2022-06-30 02:08:51.000000000 +0200 @@ -33,7 +33,7 @@ doap:maintainer <http://purl.org/NET/cpan-uri/person/tobyink>; doap:name "Sub-HandlesVia"; doap:programming-language "Perl"; - doap:release <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-001>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-002>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-003>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-004>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-005>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-006>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-007>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-008_000>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-008_001>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-008_002>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-008_003>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-009>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-010>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-011>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-012>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-013>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-014>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-015>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-016>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-017>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-018>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-019>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-020>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-021>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-022>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-023>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-024>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-025>; + doap:release <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-001>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-002>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-003>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-004>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-005>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-006>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-007>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-008_000>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-008_001>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-008_002>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-008_003>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-009>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-010>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-011>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-012>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-013>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-014>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-015>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-016>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-017>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-018>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-019>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-020>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-021>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-022>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-023>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-024>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-025>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-026>, <http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-027>; doap:repository [ a doap:GitRepository; doap:browse <https://github.com/tobyink/p5-sub-handlesvia>; @@ -533,6 +533,34 @@ doap:file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/Sub-HandlesVia-0.025.tar.gz>; doap:revision "0.025"^^xsd:string. +<http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-026> + a doap:Version; + dc:identifier "Sub-HandlesVia-0.026"^^xsd:string; + dc:issued "2022-06-30"^^xsd:date; + doap-changeset:changeset [ + doap-changeset:item [ + a doap-changeset:Addition; + rdfs:label "Support classes built with Mite."; + ]; + ]; + doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/tobyink>; + doap:file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/Sub-HandlesVia-0.026.tar.gz>; + doap:revision "0.026"^^xsd:string. + +<http://purl.org/NET/cpan-uri/dist/Sub-HandlesVia/v_0-027> + a doap:Version; + dc:identifier "Sub-HandlesVia-0.027"^^xsd:string; + dc:issued "2022-06-30"^^xsd:date; + doap-changeset:changeset [ + doap-changeset:item [ + a doap-changeset:Tests; + rdfs:label "Skip Mite test on Perl < 5.10.1"; + ]; + ]; + doap-changeset:released-by <http://purl.org/NET/cpan-uri/person/tobyink>; + doap:file-release <http://backpan.cpan.org/authors/id/T/TO/TOBYINK/Sub-HandlesVia-0.027.tar.gz>; + doap:revision "0.027"^^xsd:string. + <http://purl.org/NET/cpan-uri/person/tobyink> a foaf:Person; foaf:mbox <mailto:toby...@cpan.org>; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/CodeGenerator.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/CodeGenerator.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/CodeGenerator.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/CodeGenerator.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::CodeGenerator; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Scope::Guard (); use Class::Tiny ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/Handler.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/Handler.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/Handler.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/Handler.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::Handler; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Class::Tiny ( qw( @@ -203,7 +203,7 @@ package Sub::HandlesVia::Handler::Traditional; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; BEGIN { our @ISA = 'Sub::HandlesVia::Handler' }; @@ -225,7 +225,7 @@ package Sub::HandlesVia::Handler::CodeRef; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; BEGIN { our @ISA = 'Sub::HandlesVia::Handler' }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/Array.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/Array.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/Array.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/Array.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::HandlerLibrary::Array; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Sub::HandlesVia::HandlerLibrary; our @ISA = 'Sub::HandlesVia::HandlerLibrary'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/Bool.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/Bool.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/Bool.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/Bool.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::HandlerLibrary::Bool; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Sub::HandlesVia::HandlerLibrary; our @ISA = 'Sub::HandlesVia::HandlerLibrary'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/Code.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/Code.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/Code.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/Code.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::HandlerLibrary::Code; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Sub::HandlesVia::HandlerLibrary; our @ISA = 'Sub::HandlesVia::HandlerLibrary'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/Counter.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/Counter.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/Counter.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/Counter.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::HandlerLibrary::Counter; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Sub::HandlesVia::HandlerLibrary; our @ISA = 'Sub::HandlesVia::HandlerLibrary'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/Hash.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/Hash.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/Hash.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/Hash.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::HandlerLibrary::Hash; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Sub::HandlesVia::HandlerLibrary; our @ISA = 'Sub::HandlesVia::HandlerLibrary'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/Number.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/Number.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/Number.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/Number.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::HandlerLibrary::Number; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Sub::HandlesVia::HandlerLibrary; our @ISA = 'Sub::HandlesVia::HandlerLibrary'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/Scalar.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/Scalar.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/Scalar.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/Scalar.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::HandlerLibrary::Scalar; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Sub::HandlesVia::HandlerLibrary; our @ISA = 'Sub::HandlesVia::HandlerLibrary'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/String.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/String.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary/String.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary/String.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::HandlerLibrary::String; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Sub::HandlesVia::HandlerLibrary; our @ISA = 'Sub::HandlesVia::HandlerLibrary'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/HandlerLibrary.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/HandlerLibrary.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::HandlerLibrary; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Types::Standard qw( Any Item ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/Toolkit/Mite.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/Toolkit/Mite.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/Toolkit/Mite.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/Toolkit/Mite.pm 2022-06-30 02:08:51.000000000 +0200 @@ -0,0 +1,183 @@ +use 5.008; +use strict; +use warnings; + +package Sub::HandlesVia::Toolkit::Mite; + +our $AUTHORITY = 'cpan:TOBYINK'; +our $VERSION = '0.027'; + +use Sub::HandlesVia::Toolkit; +our @ISA = 'Sub::HandlesVia::Toolkit'; + +sub setup_for { + my $me = shift; + my ($target) = @_; + $me->install_has_wrapper($target); +} + +my %SPECS; +sub install_has_wrapper { + my $me = shift; + my ($target) = @_; + + no strict 'refs'; + no warnings 'redefine'; + + my $orig = \&{ "$target\::has" }; + *{ "$target\::has" } = sub { + my ( $names, %spec ) = @_; + return $orig->($names, %spec) unless $spec{handles}; # shortcut + + $names = [ $names ] unless ref($names); + for my $name ( @$names ) { + my $shv = $me->clean_spec( $target, $name, \%spec ); + $SPECS{$target}{$name} = \%spec; + $orig->( $name, %spec ); + $me->install_delegations( $shv ) if $shv; + } + + return; + }; +} + +my @method_name_generator = ( + { # public + reader => sub { "get_$_" }, + writer => sub { "set_$_" }, + accessor => sub { $_ }, + clearer => sub { "clear_$_" }, + predicate => sub { "has_$_" }, + builder => sub { "_build_$_" }, + trigger => sub { "_trigger_$_" }, + }, + { # private + reader => sub { "_get_$_" }, + writer => sub { "_set_$_" }, + accessor => sub { $_ }, + clearer => sub { "_clear_$_" }, + predicate => sub { "_has_$_" }, + builder => sub { "_build_$_" }, + trigger => sub { "_trigger_$_" }, + }, +); + +sub code_generator_for_attribute { + my ( $me, $target, $attrname ) = ( shift, @_ ); + + my $name = $attrname->[0]; + my $spec = $SPECS{$target}{$name}; + my $env = {}; + + my $private = 0+!! ( $name =~ /^_/ ); + + $spec->{is} ||= 'bare'; + if ( $spec->{is} eq 'lazy' ) { + $spec->{builder} = 1 unless exists $spec->{builder}; + $spec->{is} = 'ro'; + } + if ( $spec->{is} eq 'ro' ) { + $spec->{reader} = $name unless exists $spec->{reader}; + } + if ( $spec->{is} eq 'rw' ) { + $spec->{accessor} = $name unless exists $spec->{accessor}; + } + if ( $spec->{is} eq 'rwp' ) { + $spec->{reader} = $name unless exists $spec->{reader}; + $spec->{writer} = "_set_$name" unless exists $spec->{writer}; + } + + for my $property ( 'reader', 'writer', 'accessor', 'builder' ) { + my $methodname = $spec->{$property}; + if ( defined $methodname and $methodname eq 1 ) { + my $gen = $method_name_generator[$private]{$property}; + local $_ = $name; + $spec->{$property} = $gen->( $_ ); + } + } + + my ( $get, $set, $get_is_lvalue, $set_checks_isa, $default, $slot ); + + if ( my $reader = $spec->{reader} || $spec->{accessor} ) { + $get = sub { shift->generate_self . "->$reader" }; + $get_is_lvalue = !!0; + } + else { + $get = sub { shift->generate_self . "->{q[$name]}" }; + $get_is_lvalue = !!1; + } + + if ( my $writer = $spec->{writer} || $spec->{accessor} ) { + $set = sub { + my ( $gen, $expr ) = @_; + $gen->generate_self . "->$writer($expr)"; + }; + $set_checks_isa = !!1; + } + else { + $set = sub { + my ( $gen, $expr ) = @_; + "( " . $gen->generate_self . "->{q[$name]} = $expr )"; + }; + $set_checks_isa = !!0; + } + + $slot = sub { shift->generate_self . "->{q[$name]}" }; + + if ( ref $spec->{builder} ) { + $default = $spec->{builder}; + $env->{'$shv_default_for_reset'} = \$default; + } + elsif ( $spec->{builder} ) { + $default = $spec->{builder}; + } + elsif ( ref $spec->{default} ) { + $default = $spec->{default}; + $env->{'$shv_default_for_reset'} = \$default; + } + elsif ( exists $spec->{default} ) { + my $value = $spec->{default}; + $default = sub { $value }; + $env->{'$shv_default_for_reset'} = \$default; + } + + require Sub::HandlesVia::CodeGenerator; + return 'Sub::HandlesVia::CodeGenerator'->new( + toolkit => $me, + target => $target, + attribute => $name, + env => $env, + isa => $spec->{type}, + coerce => $spec->{coerce}, + generator_for_get => $get, + generator_for_set => $set, + get_is_lvalue => $get_is_lvalue, + set_checks_isa => $set_checks_isa, + set_strictly => !!1, + generator_for_default => sub { + my ( $gen, $handler ) = @_ or die; + if ( !$default and $handler ) { + return $handler->default_for_reset->(); + } + elsif ( is_CodeRef $default ) { + return sprintf( + '(%s)->$shv_default_for_reset', + $gen->generate_self, + ); + } + elsif ( is_Str $default ) { + require B; + return sprintf( + '(%s)->${\ %s }', + $gen->generate_self, + B::perlstring( $default ), + ); + } + return; + }, + ( $slot ? ( generator_for_slot => $slot ) : () ), + ); +} + +1; + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/Toolkit/Moo.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/Toolkit/Moo.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/Toolkit/Moo.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/Toolkit/Moo.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::Toolkit::Moo; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Sub::HandlesVia::Toolkit; our @ISA = 'Sub::HandlesVia::Toolkit'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/Toolkit/Moose.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/Toolkit/Moose.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/Toolkit/Moose.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/Toolkit/Moose.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::Toolkit::Moose; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Sub::HandlesVia::Toolkit; our @ISA = 'Sub::HandlesVia::Toolkit'; @@ -156,7 +156,7 @@ package Sub::HandlesVia::Toolkit::Moose::PackageTrait; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Role::Tiny; @@ -194,7 +194,7 @@ package Sub::HandlesVia::Toolkit::Moose::RoleTrait; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Role::Tiny; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/Toolkit/Mouse.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/Toolkit/Mouse.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/Toolkit/Mouse.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/Toolkit/Mouse.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::Toolkit::Mouse; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Sub::HandlesVia::Toolkit; our @ISA = 'Sub::HandlesVia::Toolkit'; @@ -155,7 +155,7 @@ package Sub::HandlesVia::Toolkit::Mouse::PackageTrait; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Role::Tiny; @@ -193,7 +193,7 @@ package Sub::HandlesVia::Toolkit::Mouse::RoleTrait; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Role::Tiny; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/Toolkit/Plain.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/Toolkit/Plain.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/Toolkit/Plain.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/Toolkit/Plain.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::Toolkit::Plain; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Sub::HandlesVia::Toolkit; our @ISA = 'Sub::HandlesVia::Toolkit'; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/Toolkit.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/Toolkit.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia/Toolkit.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia/Toolkit.pm 2022-06-30 02:08:51.000000000 +0200 @@ -5,7 +5,7 @@ package Sub::HandlesVia::Toolkit; our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; use Type::Params qw(compile_named_oo); use Types::Standard qw( ArrayRef HashRef Str Num Int CodeRef Bool Item ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia.pm new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia.pm --- old/Sub-HandlesVia-0.025/lib/Sub/HandlesVia.pm 2022-06-16 12:34:45.000000000 +0200 +++ new/Sub-HandlesVia-0.027/lib/Sub/HandlesVia.pm 2022-06-30 02:08:51.000000000 +0200 @@ -7,7 +7,7 @@ use Exporter::Shiny qw( delegations ); our $AUTHORITY = 'cpan:TOBYINK'; -our $VERSION = '0.025'; +our $VERSION = '0.027'; sub _generate_delegations { my ($me, $name, $args, $globals) = (shift, @_); @@ -79,6 +79,14 @@ return 'Mouse'; } + { + no strict 'refs'; + no warnings 'once'; + if ( ${"$target\::USES_MITE"} ) { + return 'Mite'; + } + } + return 'Plain'; } @@ -283,6 +291,27 @@ (If you have a moose in your kitchen, that might be even worse than the mouse.) +=head2 Using with Mite + +You should be able to use Sub::HandlesVia with L<Mite> 0.001011 or above. +Your project will still have a dependency on Sub::HandlesVia. + + package MyApp::Kitchen { + use MyApp::Mite; + use Sub::HandlesVia; + + has food => ( + is => 'ro', + isa => 'ArrayRef[Str]', + handles_via => 'Array', + default => sub { [] }, + handles => { + 'add_food' => 'push', + 'find_food' => 'grep', + }, + ); + } + =head2 Using with Anything For Moose and Mouse, Sub::HandlesVia can use their metaobject protocols diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/t/40mite/.mite/config new/Sub-HandlesVia-0.027/t/40mite/.mite/config --- old/Sub-HandlesVia-0.025/t/40mite/.mite/config 1970-01-01 01:00:00.000000000 +0100 +++ new/Sub-HandlesVia-0.027/t/40mite/.mite/config 2022-06-30 02:08:51.000000000 +0200 @@ -0,0 +1,5 @@ +--- +compiled_to: lib +project: MyTest +shim: MyTest::Mite +source_from: lib diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/t/40mite/basic.t new/Sub-HandlesVia-0.027/t/40mite/basic.t --- old/Sub-HandlesVia-0.025/t/40mite/basic.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Sub-HandlesVia-0.027/t/40mite/basic.t 2022-06-30 02:08:51.000000000 +0200 @@ -0,0 +1,43 @@ +=pod + +=encoding utf-8 + +=head1 PURPOSE + +Test that Sub::HandlesVia works with L<Mite>. + +=head1 AUTHOR + +Toby Inkster E<lt>toby...@cpan.orge<gt>. + +=head1 COPYRIGHT AND LICENCE + +This software is copyright (c) 2022 by Toby Inkster. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +=cut + +use strict; +use warnings; +use Test::More; +use Test::Requires '5.010001'; + +use FindBin qw($Bin); +use lib "$Bin/lib"; + +use MyTest; + +my $object = MyTest->new; + +$object->push( 22 ); +$object->push( 33 ); +$object->push( 44 ); + +is( $object->pop, 44 ); +is_deeply( $object->list, [ 22, 33 ] ); +is( $object->pop, 33 ); +is_deeply( $object->list, [ 22 ] ); + +done_testing; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/t/40mite/lib/MyTest/Mite.pm new/Sub-HandlesVia-0.027/t/40mite/lib/MyTest/Mite.pm --- old/Sub-HandlesVia-0.025/t/40mite/lib/MyTest/Mite.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/Sub-HandlesVia-0.027/t/40mite/lib/MyTest/Mite.pm 2022-06-30 02:08:51.000000000 +0200 @@ -0,0 +1,203 @@ +use 5.010001; +use strict; +use warnings; +## skip Test::Tabs + +package MyTest::Mite; + +# NOTE: Since the intention is to ship this file with a project, this file +# cannot have any non-core dependencies. + +use strict; +use warnings; + +sub _is_compiling { + return $ENV{MITE_COMPILE} ? 1 : 0; +} + +sub import { + my $class = shift; + my($caller, $file) = caller; + + # Turn on warnings and strict in the caller + warnings->import; + strict->import; + + if( _is_compiling() ) { + require Mite::Project; + Mite::Project->default->inject_mite_functions( + package => $caller, + file => $file, + ); + } + else { + # Work around Test::Compile's tendency to 'use' modules. + # Mite.pm won't stand for that. + return if $ENV{TEST_COMPILE}; + + # Changes to this filename must be coordinated with Mite::Compiled + my $mite_file = $file . ".mite.pm"; + if( !-e $mite_file ) { + require Carp; + Carp::croak("Compiled Mite file ($mite_file) for $file is missing"); + } + + { + local @INC = ('.', @INC); + require $mite_file; + } + + $class->_install_exports( $caller, $file ); + } +} + +sub _install_exports { + my ( $class, $caller, $file ) = ( shift, @_ ); + + no strict 'refs'; + *{ $caller .'::has' } = sub { + my $names = shift; + $names = [$names] unless ref $names; + my %args = @_; + for my $name ( @$names ) { + $name =~ s/^\+//; + + my $default = $args{default}; + if ( ref $default eq 'CODE' ) { + ${$caller .'::__'.$name.'_DEFAULT__'} = $default; + } + + my $builder = $args{builder}; + if ( ref $builder eq 'CODE' ) { + *{"$caller\::_build_$name"} = $builder; + } + + my $trigger = $args{trigger}; + if ( ref $trigger eq 'CODE' ) { + *{"$caller\::_trigger_$name"} = $trigger; + } + } + + return; + }; + + # Method modifiers - these actually happen at runtime. + { + my $parse_args = sub { + my $coderef = pop; + my $names = [ map { ref($_) ? @$_ : $_ } @_ ]; + ( $names, $coderef ); + }; + + my $get_orig = sub { + my $name = shift; + \&{ "$caller\::$name" }; + }; + + *{ $caller .'::before' } = sub { + my ( $names, $coderef ) = &$parse_args; + for my $name ( @$names ) { + my $orig = $get_orig->($name); + local $@; + eval <<"BEFORE" or die $@; + package $caller; + no warnings 'redefine'; + sub $name { + \$coderef->( \@_ ); + \$orig->( \@_ ); + } + 1; +BEFORE + } + return; + }; + + *{ $caller .'::after' } = sub { + my ( $names, $coderef ) = &$parse_args; + for my $name ( @$names ) { + my $orig = $get_orig->($name); + local $@; + eval <<"AFTER" or die $@; + package $caller; + no warnings 'redefine'; + sub $name { + my \@r; + if ( wantarray ) { + \@r = \$orig->( \@_ ); + } + elsif ( defined wantarray ) { + \@r = scalar \$orig->( \@_ ); + } + else { + \$orig->( \@_ ); + 1; + } + \$coderef->( \@_ ); + wantarray ? \@r : \$r[0]; + } + 1; +AFTER + } + return; + }; + + *{ $caller .'::around' } = sub { + my ( $names, $coderef ) = &$parse_args; + for my $name ( @$names ) { + my $orig = $get_orig->($name); + local $@; + eval <<"AROUND" or die $@; + package $caller; + no warnings 'redefine'; + sub $name { + \$coderef->( \$orig, \@_ ); + } + 1; +AROUND + } + return; + }; + } + + # Inject blank Mite routines + for my $name (qw( extends )) { + *{ $caller .'::'. $name } = sub {}; + } +} + +1; + +__END__ + +=pod + +=head1 NAME + +MyTest::Mite - shim to load .mite.pm files + +=head1 DESCRIPTION + +This is a copy of L<Mite::Shim>. + +=head1 AUTHOR + +Michael G Schwern E<lt>mschw...@cpan.orge<gt>. + +Toby Inkster E<lt>toby...@cpan.orge<gt>. + +=head1 COPYRIGHT AND LICENCE + +This software is copyright (c) 2011-2014 by Michael G Schwern. + +This software is copyright (c) 2022 by Toby Inkster. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. + +=head1 DISCLAIMER OF WARRANTIES + +THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF +MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +=cut diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/t/40mite/lib/MyTest.pm new/Sub-HandlesVia-0.027/t/40mite/lib/MyTest.pm --- old/Sub-HandlesVia-0.025/t/40mite/lib/MyTest.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/Sub-HandlesVia-0.027/t/40mite/lib/MyTest.pm 2022-06-30 02:08:51.000000000 +0200 @@ -0,0 +1,17 @@ +package MyTest; + +use MyTest::Mite; +use Sub::HandlesVia; + +has list => ( + is => 'ro', + isa => 'ArrayRef', + default => sub { [] }, + handles_via => 'Array', + handles => { + push => 'push', + pop => 'pop', + }, +); + +1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Sub-HandlesVia-0.025/t/40mite/lib/MyTest.pm.mite.pm new/Sub-HandlesVia-0.027/t/40mite/lib/MyTest.pm.mite.pm --- old/Sub-HandlesVia-0.025/t/40mite/lib/MyTest.pm.mite.pm 1970-01-01 01:00:00.000000000 +0100 +++ new/Sub-HandlesVia-0.027/t/40mite/lib/MyTest.pm.mite.pm 2022-06-30 02:08:51.000000000 +0200 @@ -0,0 +1,83 @@ +{ +package MyTest; +our $USES_MITE = 1; +use strict; +use warnings; +## skip Test::Tabs + +sub new { + my $class = ref($_[0]) ? ref(shift) : shift; + my $meta = ( $Mite::META{$class} ||= $class->__META__ ); + my $self = bless {}, $class; + my $args = $meta->{HAS_BUILDARGS} ? $class->BUILDARGS( @_ ) : { ( @_ == 1 ) ? %{$_[0]} : @_ }; + my $no_build = delete $args->{__no_BUILD__}; + + # Initialize attributes + if ( exists($args->{q[list]}) ) { do { package MyTest::Mite; ref($args->{q[list]}) eq 'ARRAY' } or require Carp && Carp::croak(q[Type check failed in constructor: list should be ArrayRef]); $self->{q[list]} = $args->{q[list]}; } else { my $value = do { my $default_value = do { our $__list_DEFAULT__; $__list_DEFAULT__->($self) }; (ref($default_value) eq 'ARRAY') or do { require Carp; Carp::croak(q[Type check failed in default: list should be ArrayRef]) }; $default_value }; $self->{q[list]} = $value; } + + # Enforce strict constructor + my @unknown = grep not( do { package MyTest::Mite; (defined and !ref and m{\A(?:list)\z}) } ), keys %{$args}; @unknown and require Carp and Carp::croak("Unexpected keys in constructor: " . join(q[, ], sort @unknown)); + + # Call BUILD methods + unless ( $no_build ) { $_->($self, $args) for @{ $meta->{BUILD} || [] } }; + + return $self; +} + +defined ${^GLOBAL_PHASE} + or eval { require Devel::GlobalDestruction; 1 } + or do { *Devel::GlobalDestruction::in_global_destruction = sub { undef; } }; + +sub DESTROY { + my $self = shift; + my $class = ref( $self ) || $self; + my $meta = ( $Mite::META{$class} ||= $class->__META__ ); + my $in_global_destruction = defined ${^GLOBAL_PHASE} + ? ${^GLOBAL_PHASE} eq 'DESTRUCT' + : Devel::GlobalDestruction::in_global_destruction(); + for my $demolisher ( @{ $meta->{DEMOLISH} || [] } ) { + my $e = do { + local ( $?, $@ ); + eval { $demolisher->( $self, $in_global_destruction ) }; + $@; + }; + no warnings 'misc'; # avoid (in cleanup) warnings + die $e if $e; # rethrow + } + return; +} + +sub __META__ { + no strict 'refs'; + require mro; + my $class = shift; $class = ref($class) || $class; + my $linear_isa = mro::get_linear_isa( $class ); + return { + BUILD => [ + map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } + map { "$_\::BUILD" } reverse @$linear_isa + ], + DEMOLISH => [ + map { ( *{$_}{CODE} ) ? ( *{$_}{CODE} ) : () } + map { "$_\::DEMOLISH" } @$linear_isa + ], + HAS_BUILDARGS => $class->can('BUILDARGS'), + }; +} + +my $__XS = !$ENV{MITE_PURE_PERL} && eval { require Class::XSAccessor; Class::XSAccessor->VERSION("1.19") }; + +# Accessors for list +if ( $__XS ) { + Class::XSAccessor->import( + chained => 1, + getters => { q[list] => q[list] }, + ); +} +else { + *list = sub { @_ > 1 ? require Carp && Carp::croak("list is a read-only attribute of @{[ref $_[0]]}") : $_[0]{q[list]} }; +} + + +1; +} \ No newline at end of file