October 2010 Archives

Moose 1.18 (and 1.17) are again primarily bug fix releases. In particular, we've killed some bugs that were introduced in 1.15 with the changes to native delegations. If you're using native delegations in your code and you've already installed Moose 1.15 or newer, we strongly encourage you to upgrade.

This release also fixes some random older bugs that have been lingering in rt.cpan for a while.

Finally, this release moves Moose and all of its prereqs from Test::Exception to Test::Fatal. Test::Exception depends on Sub::Uplevel, a module that tends to break with changes in the Perl core. This should make Moose a little more robust against future core changes.

Moose 1.16 (and Class::MOP 1.10) will be out shortly, and it's mostly bug fixes.

Among the bigger changes ...

  • Native delegation methods which change the attribute value now have explicitly documented return values. Before 1.15, a lot of them had implicit return values, and some of those return values were kind of confusing. Now we make a point of returning whatever the equivalent Perl builtin operation would return, and we document that.
  • Native delegations have better docs in general.
  • Some native delegation methods which required a string argument didn't accept an empty string, like Array->join. Oops, that was wrong.
  • Deprecation warnings have been improved. They're now more likely to find the right caller of the deprecated feature, some of the warnings have been improved, and we've fixed some cases where you got a warning when you were doing something perfectly acceptable.

You can take a look at Changes in git while the release makes its way to CPAN.

If you're using 1.15, you should probably upgrade to 1.16. If you're on an earlier version, you should consider upgrading too. As always, please test your code with the new Moose.

What's New in Moose 1.15

| No TrackBacks

The latest release of Moose is out, and it has some big changes for Native traits.

Native trait delegations are now turned into inline code, just like regular attributes. What this means is that Moose actually generates Perl code when your class loads and then evals it.

The upside is that this makes native trait delegations faster, potentially much faster. With previous versions of Moose, if you defined a native trait as ro or bare, then you could easily end up with a pathologically slow case for delegation.

With the latest Moose, all code is inlined to use direct slot access, which is much faster.

As a bonus, native trait attributes now act more correctly. Constraints are always checked when the value of the attribute changes, and triggers are also fired.

The downside of more code generation is that this makes the compile time a little slower (in direct proportion to how many native delegations you use).

We've also made it possible to prevent Moose from adding a meta method to your class. This is handy for classes which are inheritng from a non-Moose parent (like Rose::DB::Object) that also defines a meta method.

That's the highlights of 1.15. Some of these changes (like checking constraints properly for native traits) could break existing code. Please make sure to read Moose::Manual::Delta when you upgrade!

About this Archive

This page is an archive of entries from October 2010 listed from newest to oldest.

September 2010 is the previous archive.

November 2010 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Categories

Pages

Powered by Movable Type 4.38