PLJava module need help

Discussion in 'Perl Misc' started by harris, Sep 2, 2004.

  1. harris

    harris Guest

    I am using PLJava module on Windows 2k. The module compiled and test
    program works okay.

    I tried following code which does not run and it crashes.

    import perl5.Perl ;
    import perl5.SV ;

    public class testsub {

    public static void main(String argv[]) {

    Perl.eval("print qq`Hello World!\n` ;") ;

    ///////////////////

    SV foo = Perl.NEW("foo") ; // $foo = new foo() ;

    foo.call("test", "123,456") ; // $foo->test(123,456) ;
    }
    }

    There is separate file foo.pm in same path where java class file is
    located, which is not found by above testsub program. foo.pm looks as
    follows-
    #
    #foo.pm
    package foo;

    sub new {
    bless{};
    }

    sub test {
    print print qq`FOO>> @_\n`
    }

    sub DESTROY {
    print qq`DEST>> @_\n` ;
    }
    1;

    Any ideas why this fails? Thanks in advance.
    Harris M.
     
    harris, Sep 2, 2004
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
There are no similar threads yet.
Loading...