in reply to Re^3: Trying to make perl suck less again
in thread Trying to make perl suck less again

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^5: Trying to make perl suck less again
by stvn (Monsignor) on Dec 23, 2007 at 21:18 UTC

    **SIGH** Evan, Evan, Evan, please get your facts straight.

    1. isa => "foo|bar" (used to work), now requires isa => "foo | bar"

    Actually, "foo|bar" never worked, Moose just assumed it was some odd class name. And for the record, it works fine now. Try this with the latest Moose (using the oose helper module of course).

    perl -Moose=Foo -e 'has bar => (isa => "Str|Int"); print Foo->new(bar +=> 100)->dump; print Foo->new(bar => "Hello")->dump;' ;
    I don't consider this breaking backwards compat, but fixing a bug.

    -stvn
Re^5: Trying to make perl suck less again
by ysth (Canon) on Dec 23, 2007 at 20:54 UTC
    I'm not talking about the kind of backwards compatibility that by definition every enhancement or bugfix breaks. I'm talking about the kind where completely unrelated things suddenly stop working, ala:
    $ perl5.10.0 -w sub when { use POSIX "strftime"; strftime("[%Y-%m-%d %H:%M:%S] ", gmti +me) } warn when, "some warning"; __END__ [2007-12-23 20:51:11] some warning at - line 2. $ perl5.10.0 -w use feature ":5.10"; sub when { use POSIX "strftime"; strftime("[%Y-%m-%d %H:%M:%S] ", gmti +me) } warn when, "some warning"; __END__ syntax error at - line 3, near "warn when" Execution of - aborted due to compilation errors.
    Given that the whole point of the feature pragma is to require explicit enabling of stuff that is likely to break existing code, I really don't see automatically enabling it in Moose.

    What happens when 5.12 comes out? Do you switch to enabling ":5.12" features? How many hundreds or thousands of modules do you hope will be using Moose by then?

    A reply falls below the community's threshold of quality. You may see it by logging in.