Book a Demo

Author Topic: Add-In with Perl (perlctrl)  (Read 4536 times)

Danor

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Add-In with Perl (perlctrl)
« on: March 28, 2013, 03:02:52 am »
Hello,
I'm working with EA 9.3 and would like to create a Add-In based on Perl. With perlctrl (I've got the PerlDevKit) I'm able to create a .dll out of my perl code.

Up to now I've created a file which contains a EA_Connect function and created me a .dll file. Registered it and added an entry in the EA  egistry, so that EA finds it. Unfortunately EA won't start up anymore, unless I delete the registry entry again. Any idea what I could have done wrong ?

Looking forward for some help  :) Thanks

the EA_Connect function :
Code: [Select]
sub EA_Connect {
  my $repo = $_[0];
  return "";
}

the method declaration for perlctrl:
Code: [Select]
...
EA_Connect => {
RetType             =>  VT_BSTR,
TotalParams         =>  3,
NumOptionalParams   =>  3,
ParamList           =>[ ParamName1 => VT_DISPATCH,
ParamName2 => VT_BSTR,
ParamName3 => VT_BSTR],
},
...

the perctrl call :
perctrl myadd.pl
what creates a myadd.dll . Maybe I've missed some important settings ?


g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Add-In with Perl (perlctrl)
« Reply #1 on: March 28, 2013, 03:52:20 am »
I'm no perl expert, but have a look at this thread: http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1364378966. Honestly though perl and java are very different, I doubt you'll get this working.

Best regards,
Günther
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Add-In with Perl (perlctrl)
« Reply #2 on: March 28, 2013, 09:34:07 am »
I have uploaded a complete Perl framework you may use: http://community.sparxsystems.com/resources/scripts/extending-ea-perl

q.

Danor

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Add-In with Perl (perlctrl)
« Reply #3 on: April 03, 2013, 05:58:20 pm »
Thanks for the replies.

I got your perl plugin. I first added the dll file which comes with it, what worked without problems.
Second I created a new dll out of the EaControl, after registering this I have the old Problem ? Do you have an idea what I could have done wrong ?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Add-In with Perl (perlctrl)
« Reply #4 on: April 03, 2013, 10:44:16 pm »
Not really. You need to put in lots of print statements (write to a file) in order to find out where the bug is buried.

q.