Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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() ; }
mike

Comment on C# and active states PerlCOM
Download Code
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2015-07-02 00:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls