in reply to Re: why is there no a PVM for perl?
in thread why is there no a PVM for perl?

In theory perl is a PVM. However in reality I found Perl often less compatible then claimed on various forums and places.

The problem is not the core of Perl, but often the CPAN modules. A multitude depends on an specific underlying function call or program, often only found in the Linux world. The use of a XS interface, often present in the modules without any mention in the documentation, can really break portability.

I love programming in Perl but I don't claim any more that it is portable. I always say that minor work is most likely. I ran often enough in the same kind problems while porting a script developed on Linux to Windows.

So the grandparent has a point.

I would like to know from fellow monks what kind tips and tricks they have in store to avoid a maximum number of problems. Parallelism is such item where I'm very weary for potential problems when porting code.

my 2 cents

Martell

Replies are listed 'Best First'.
Re^3: why is there no a PVM for perl? (avoiding native code)
by LanX (Saint) on Jun 02, 2011 at 17:01 UTC
    > A multitude depends on an specific underlying function call or program, often only found in the Linux world. The use of a XS interface, often present in the modules without any mention in the documentation, can really break portability.

    IMHO you are idealizing JAVA now, because use of native libraries causes the same problems there.

    For much the same reasons I try to avoid modules using XS. Just inspect the dependencies in CPAN and parse the code for DynaLoader to do so.

    Cheers Rolf

      For much the same reasons I try to avoid modules using XS.

      like I said above, Cwd is standard module shipped with perl, but it can't still be updated with ease. I can't imagine how handle other less-tested modules.

      Second, the situation which a perl user have to use make to install module is a little ridiculous too. Module::Build has existed almost 10 years, but it seems few guys try it.

        Module::Build has existed almost 10 years, but it seems few guys try it.

        I personally find typing ./Build very hard comparing to make, they could at least call it ./build, yet better they could install build somewhere in the $PATH. Also typing ./Build test to make test is kinda unnatural ;)

Re^3: why is there no a PVM for perl?
by ikegami (Patriarch) on Jun 02, 2011 at 16:49 UTC

    In theory perl is a PVM. However in reality I found Perl often less compatible then claimed on various forums and places.

    Compatible with what?

    A multitude depends on an specific underlying function call or program, often only found in the Linux world. The use of a XS interface, often present in the modules without any mention in the documentation, can really break portability.

    What does Perl having a VM have to do with portability, especially those of native libraries? That's the point, not a question. The OP is conflating two topics.