Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://167027]
Approved by broquaint
help
Chatterbox?
[ambrus]: Corion: um, that was me (duh)
[ambrus]: I just can't get you two to cooperate directly because schmorp doesn't want to be in the chatterbox
[ambrus]: maybe you should join his irc channel or something, unless that causes a flame blowup

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2016-12-09 14:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (151 votes). Check out past polls.