AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PerlCOM / PerlCtrl - using Perl with AHK via COM ??!

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources
View previous topic :: View next topic  
Author Message
BoBoĻ
Guest





PostPosted: Wed Oct 10, 2007 8:50 am    Post subject: PerlCOM / PerlCtrl - using Perl with AHK via COM ??! Reply with quote

Quote:
[...] On Win32, you can use PerlCOM and PerlCtrl to use Perl in surprising places. Both PerlCOM and PerlCtrl are based on COM (Microsoft's Component Object Model), which allows you to glue objects together at run-time in a language-independent way. It's language-independent because you can access a COM object written in C++ from Perl or Visual Basic, a COM object written in Perl from C++ or Visual Basic, and so on. If you can develop a COM component in one language, you can use that component from any other language that supports COM. I'll demonstrate both PerlCOM and PerlCtrl in this article. We'll use PerlCOM to use a Perl module, Net::Ping, from COM. Then we'll use PerlCtrl to turn a chunk of Perl code, Vector.ctrl, into an ActiveX control that can be embedded in a web page.

COM provides the low-level mechanisms to glue objects together. There are two ways to create controls with COM: OLE and ActiveX. OLE (see TPJ #10) is the bulkier of the two, providing services for desktop applications, such as facilities for creating compound documents. ActiveX is a slimmer version of OLE that was originally optimized for embedding controls in web documents. However, you can use ActiveX and OLE controls in applications written in a high-level language such as Visual C++, Visual Basic, or Perl.

Perl developers can use PerlCOM and PerlCtrl to leverage Perl in a COM environment. For example, if you've got a spreadsheet that needs to do some heavy regular expression work, you can use ActiveState's PerlCOM or PerlCtrl to call on Perl without having to embed Perl in the spreadsheet program itself. PerlCOM is an ActiveX component that exposes a Perl interpreter, and PerlCtrl is a tool that lets you develop ActiveX controls in Perl. ActiveState's PerlCOM and PerlCtrl are included with the Win32 Perl Resource Kit, which is published by O'Reilly and Associates. PerlCOM and PerlCtrl may also be available separately in the future. Keep an eye on http://perl.oreilly.com and http://www.ActiveState.com for details.

WHAT ARE PEOPLE DOING WITH COM?
People are developing all sorts of groovy things with COM - there's no shortage of ActiveX controls available to web developers. These include simple plugins such as the multimedia viewers to sophisticated tools like the WinFrame client, which allows you to launch remote Windows applications within your browser. ActiveX controls are available for application development as well, such as hierarchical data controls to data engines for performing mathematical manipulations.

Wouldn't it be neat to be able to tap in to Perl's richness from within Visual Basic or a desktop application like Word or Excel? With PerlCOM or PerlCtrl, it's no trouble to add powerful WWW access to your application with something like libwww-perl.

VBSCRIPT FOR THE SAKE OF DISCUSSION
I'm going to use VBScript to showcase the talents of PerlCOM and PerlCtrl. Although VBScript is, at best, a lightweight development tool, it is ideal for what we need to cover in this article. [more...]
Smile
Back to top
hoppfrosch



Joined: 25 Jan 2006
Posts: 16
Location: Somewhere in Germany

PostPosted: Thu Oct 11, 2007 6:41 am    Post subject: Reply with quote

PerlCOM(obsolete) and PerlCtrl are part of commercial package PDK 7.0 by ActiveState


see: http://aspn.activestate.com/ASPN/docs/PDK/7.0/Release.html
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group