Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

C# and active states PerlCOM

by mdupont (Scribe)
on May 16, 2002 at 15:25 UTC ( #167027=perlquestion: print w/replies, xml ) Need Help??

mdupont has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monk,

Maybe you have experience with PerlCom a Com object that contains perl.

Following is attempt at C# code to access the PerlCom Com lib via the .NET dynamic dispatch reflection interface.

I am getting a MissingMethodException exception, can you please advise if I am doing something wrong?

PerlCOMLib.PerlCOMClass Perl = new PerlCOMLib.PerlCOMClass(); Perl.EvalScript ("sub test{ return 1;};"); Type t = Perl.GetType(); Object ret = null; try { t.InvokeMember( "test", System.Reflection.BindingFlags.InvokeMethod, null, ret, null); // print the result textBoxResult.Text = ret.ToString() ; } catch (System.MissingMethodException mme) { // print the result textBoxResult.Text = mme.ToString() ; }

Replies are listed 'Best First'.
Re: C# and active states PerlCOM
by c-era (Curate) on May 16, 2002 at 17:40 UTC
    With out seeing the perl code, I can't give you any advice.

    Although, you may want to try perlNET from active state (it is included in the devkit). I've personally used it, and while there are a few issues, it works resonably well (definitely easier to integrate with C#).
      Sorry but the perl code was there.

      It is just really small.

      Perl.EvalScript ("sub test{ return 1;};");

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://167027]
Approved by broquaint
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2022-05-20 20:34 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (76 votes). Check out past polls.