in reply to RFC: Idiomless Perl

Sounds like you want autobox.

Replies are listed 'Best First'.
Re^2: RFC: Idiomless Perl
by stvn (Monsignor) on Feb 02, 2007 at 16:35 UTC

    Actually autobox itself only provides the means to do this, it provides no actual implementation for core types.

    For actual implementations there are two currently on CPAN. The first one was autobox::Core which attempts to map all the built in Perl functions as methods. Then came Moose::Autobox (which I wrote, so yes, I am biased) which tries to take an approach more akin to what Perl 6 might look like and build the core types out of roles.

    As for practical usage of any of these modules, I can't honestly say that I would use any of them in production. In my experience autobox is pretty stable, but it does seem to impose a noticable startup penalty and IIRC it (ab)uses an undocumented "feature" in the Perl core.

    Of course in the end, it comes down to how OO-pure do you want to be really? There is something to be said for a healthy dose of practical impurity :)

    -stvn