Results 1 to 3 of 3

Thread: Perl/VB question

  1. #1

    Thread Starter
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Perl/VB question

    Hi all!

    I've got a program which I use which can be added to/enhanced by writing Perl scripts. On the very first example code they give you it talks about setting up a variable/scalar wahtever you call this in Perl (as I'm new to this language) to hold this program's environment:

    my $X = XPPcompo::new();

    so I can call it's objects from this & modify them. I was wondering if this is like calling a createobject("word.application") call in vb to set up an environment/object reference & if this is the same, was wondering where I could find (maybe in the registry) the full name of the reference so I could use it in vb ( as calling createobject("XPPcompo") or createobject("XPPCompo.Application") etc doesn't work.

    Thanks!

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    It is like that in concept, but very different in implementation. The VB CreateObject uses the Windows ActiveX/Automation/COM system to locate objects in the registry, locate their provider DLLs and create them.
    Perl uses Perl modules, which is a feature of the Perl interpreter and thus works on all platforms the same. You have to tell the Perl interpreter that you're going to use a module by adding
    use modulename
    at the top of the file. This particular module might be an exception though as the interpreter seems to be controlled by the app and the module is essential. Which probably means that the app provides it automatically (somewhat like that references to the Word Object Library are automatically added to all Word macros).
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    Makes much more sense now, thanks for that explanation - made it clearer for me!

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width