Update devel/p5-Class-MOP to 0.80.
devel/p5-Moose update upthread. This diff against -current ports tree.
Passes regress on i386.
Class::MOP 0.80 changes:
0.80 Wed, April 1, 2009
* Class::MOP::*
- Call user_class->meta in fewer places, with the eventual goal
of allowing the user to rename or exclude ->meta
altogether. Instead uses Class::MOP::class_of. (Sartak)
* Class::MOP
- New class_of function that should be used to retrieve a
metaclass. This is unlike get_metaclass_by_name in that it
accepts instances, not just class names. (Sartak)
* Class::MOP
- load_first_existing_class didn't actually load the first
existing class; instead, it loaded the first existing and
compiling class. It now throws an error if a class exists (in
@INC) but fails to compile. (hdp)
* Class::MOP
* Class::MOP::Class
- we had some semi-buggy code that purported to provide a
HAS_ISAREV based on whether mro had get_isarev (due to an
oversight, it always returned 1). Since mro and MRO::Compat
have always had get_isarev, HAS_ISAREV was pointless. This
insight simplified the subclasses method by deleting the
pure-perl fallback. HAS_ISAREV is now deprecated. (Sartak)
James Wright wrote:
Updating p5-Moose to 0.73 and p5-Class-MOP to 0.79;
Class::MOP 0.79 changes:
* Class::MOP::Class
* Class::MOP::Immutable
- A big backwards-incompatible refactoring of the Immutable API,
and the make_immutable/make_mutable pieces of the Class
API. The core __PACKAGE__->meta->make_immutable API remains
the same, however, so this should only affect the most
guts-digging code.
* XS code
- The XS code used a macro, XSPROTO, that's only in 5.10.x. This
has been fixed to be backwards compatible with 5.8.x.
* Class::MOP::Class
- Add a hook for rebless_instance_away (Sartak)
- Use blessed instead of ref to get an instance's class name
in rebless_instance. (Sartak)
Moose 0.73 changes:
* Everything
- Almost every module has complete API documentation. A few
methods (and even whole classes) have been intentionally
excluded pending some rethinking of their APIs.
* Moose::Util::TypeConstraints
- Calling subtype with a name as the only argument is now an
exception. If you want an anonymous subtype do:
my $subtype = subtype as 'Foo';
* Moose::Cookbook::Meta::Recipe7
- A new recipe, creating a custom meta-instance class.
* Moose::Cookbook::Basics::Recipe5
- Fix various typos and mistakes. Includes a patch from Radu
Greab.
* Moose::Cookbook::Basics::Recipe9
- Link to this recipe from Moose.pm's builder blurb
* Moose::Exporter
- When wrapping a function with a prototype, Moose::Exporter now
makes sure the wrapped function still has the same
prototype. (Daisuke Maki)
* Moose::Meta::Attribute
- Allow a subclass to set lazy_build for an inherited
attribute. (Dieter Pearcey)
* Makefile.PL
- Explicitly depend on Data::OptList. We already had this dependency
via Sub::Exporter, but since we're using it directly we're
better off with it listed. (Sartak)
* Moose::Meta::Method::Constructor
- Make it easier to subclass the inlining behaviour. (Ash
Berlin)
* Moose::Manual::Delta
- Details significant changes in the history of Moose, along
with recommended workarounds.
* Moose::Manual::Contributing
- Contributor's guide to Moose.
* Moose::Meta::Method::Constructor
- The long-deprecated intialize_body method has been removed
(yes, spelled like that).
* Moose::Meta::Method::Destructor
- This is_needed method is now always a class method.
* Moose::Meta::Class
- Changes to the internals of how make_immutable works to match
changes in latest Class::MOP.
Important changes in Moose are now documented in the
Moose::Manual::Delta manpage
The patch to correct gmake-isms in p5-Class-MOP/patches/Makefile.PL is
no longer needed so apply the patch with -E (I did remember to cvs rm
patches this time) Both of these need the other to be updated, so it
might be worth adding a conflict marker, but I left that undone for now.
James Wright wrote:
Mostly documentation, deprecations and bugfixes in the Moose case.
I have added more REGRESS_DEPENDS to Moose so that fewer tests are
skipped (the remaining missing dependencies required for a full test
are DBM::Deep, Params::Coerce and Declare::Constraints::Simple)
I also added Task::Weaken (checks for a 'weaken' function at
Makefile.PL time) to BUILD_DEPENDS for both Class::MOP and Moose.
The patch to eliminate gmake-isms in Class-MOP/Makefile.PL in has
been removed as it is no longer required (so remember to use patch -E
to apply)
NB: Unfortunately these two modules have become deeply intertwined;
while it makes sense for newer Moose to require newer Class::MOP,
older Moose now cannot run against that newer Class::MOP (f.e. Moose
0.68 and Class::MOP 0.78)
During the configure stage of building these ports, the warning
'Warning: prerequisite Test::More 0.77 not found. We have 0.72.' will
be printed. This seems an unnecessary dependency as the Test::More
we have in base (Test::More 0.72) runs fine with the regression
test. Should warnings like this be patched away, ignored or should
the modules get updated in base?
Tested on i386 only for now.
:
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/p5-Class-MOP/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile 9 Feb 2009 12:08:25 -0000 1.6
+++ Makefile 2 Apr 2009 12:39:45 -0000
@@ -5,7 +5,7 @@
COMMENT= meta object protocol for perl 5
MODULES= cpan
-DISTNAME= Class-MOP-0.76
+DISTNAME= Class-MOP-0.80
CATEGORIES= devel
# perl
@@ -14,7 +14,8 @@
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
-BUILD_DEPENDS= ${RUN_DEPENDS}
+BUILD_DEPENDS= ${RUN_DEPENDS} \
+ ::devel/p5-Task-Weaken
RUN_DEPENDS= ::devel/p5-Devel-GlobalDestruction \
::devel/p5-MRO-Compat \
::devel/p5-Sub-Identify \
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/p5-Class-MOP/distinfo,v
retrieving revision 1.5
diff -u -r1.5 distinfo
--- distinfo 9 Feb 2009 12:08:25 -0000 1.5
+++ distinfo 2 Apr 2009 12:39:45 -0000
@@ -1,5 +1,5 @@
-MD5 (Class-MOP-0.76.tar.gz) = eeP02o+snSyWAXd753J5yg==
-RMD160 (Class-MOP-0.76.tar.gz) = NVexK519YQNfpOxd1dlIXCseq3o=
-SHA1 (Class-MOP-0.76.tar.gz) = wbR8kc2fbEFOigSfccOSgwIMSSY=
-SHA256 (Class-MOP-0.76.tar.gz) = 3sfN7d7EQ/x+74IgUZiX7+sHnlZWURrcLqYB9D08ykM=
-SIZE (Class-MOP-0.76.tar.gz) = 154409
+MD5 (Class-MOP-0.80.tar.gz) = hcSAhQ4f/HlTZhWdebJBxA==
+RMD160 (Class-MOP-0.80.tar.gz) = 6SZMmzk1B0xAaEUhpEYZC55V2ZE=
+SHA1 (Class-MOP-0.80.tar.gz) = DmEQvhiLng1YTO9vW1ZreRb3Xrc=
+SHA256 (Class-MOP-0.80.tar.gz) = iBhoXpXA5sbGxKJHO5c4sZSd/FAd3VNy3odPt/6vsbo=
+SIZE (Class-MOP-0.80.tar.gz) = 170318
Index: patches/patch-Makefile_PL
===================================================================
RCS file: patches/patch-Makefile_PL
diff -N patches/patch-Makefile_PL
--- patches/patch-Makefile_PL 9 Feb 2009 12:08:25 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,46 +0,0 @@
-$OpenBSD: patch-Makefile_PL,v 1.1 2009/02/09 12:08:25 simon Exp $
-
-Avoid GNU make inference rules extension, from NetBSD (applied uptream
-already).
-
---- Makefile.PL.orig Thu Jan 22 23:20:41 2009
-+++ Makefile.PL Mon Feb 9 11:54:12 2009
-@@ -130,9 +130,7 @@ sub is_maintainer {
- sub get_pp_tests {
- opendir my $dh, 't' or die "Cannot read t: $!";
-
-- return map {
-- File::Spec->catfile('t', "pp_${_}")
-- } grep { $_ !~ /^99/ } grep {/^\d.+\.t$/} readdir $dh;
-+ return grep { $_ !~ /^99/ } grep {/^\d.+\.t$/} readdir $dh;
- }
-
- # This is EUMM voodoo
-@@ -149,9 +147,17 @@ sub init {
- package MY;
-
- sub postamble {
-- my $pp_tests = join q{ }, ::get_pp_tests();
-+ my @test_files = ::get_pp_tests();
-+ my $pp_tests = join q{ }, map { File::Spec->catfile('t', "pp_${_}") }
@test_files;
-+ my @pp_test_targets = join qq{\n}, map {
-+ my $source = File::Spec->catfile('t', ${_});
-+ File::Spec->catfile('t', "pp_${_}") . q{: }
-+ . qq{$source t/header_pp.inc\n\t}
-+ . q{$(NOECHO) $(ABSPERLRUN) "-MExtUtils::Command" -e cat
t/header_pp.inc }
-+ . $source . q{ > $...@} . qq{\n}
-+ } @test_files;
- my $test_dep = $::has_compiler && ::is_maintainer()
-- ? 'pure_all :: pp_tests'
-+ ? qq{pure_all :: pp_tests\n} . join qq{\n}, @pp_test_targets
- : '';
-
- return <<"EOM"
-@@ -159,7 +165,5 @@ pp_tests: ${pp_tests}
-
- ${test_dep}
-
--t/pp_%: t/% t/header_pp.inc
--\t\$(NOECHO) \$(ABSPERLRUN) "-MExtUtils::Command" -e cat t/header_pp.inc \$<
> \$@
- EOM
- }