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?
mikePerlCOMLib.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() ; }
Back to
Seekers of Perl Wisdom