Click here to get back home

ANNOUNCE: Inline::WSC V0.01

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
ANNOUNCE: Inline::WSC V0.01 jdrago_999 04-26-2006
Posted by jdrago_999 on April 26, 2006, 11:22 am
Please log in for more thread options


Inline::WSC allows Perl to call JavaScript and VBScript methods,
passing parameters and retrieving return values.

Inline::WSC is Win32-only.

Inline::WSC is available for download on CPAN now.

Example:

use Inline::WSC VBScript => <<'EOF';

Function Hello( ByVal Name )
Hello = "Hello there, " & Name & "!"
End Function

EOF

print Hello( "Fred" );
# Hello there, Fred!

Enjoy!


Posted by Sisyphus on April 27, 2006, 7:29 am
Please log in for more thread options



> Inline::WSC allows Perl to call JavaScript and VBScript methods,
> passing parameters and retrieving return values.
>
> Inline::WSC is Win32-only.
>
> Inline::WSC is available for download on CPAN now.
>
> Example:
>
> use Inline::WSC VBScript => <<'EOF';
>
> Function Hello( ByVal Name )
> Hello = "Hello there, " & Name & "!"
> End Function
>
> EOF
>
> print Hello( "Fred" );
> # Hello there, Fred!
>

I've never messed with VBScript before, though now that you've provided an
Inline of it, I might just meddle with it from time to time :-)

One problem is that 'C:\windows\temp' is not guaranteed to exist, or be
writable by the user. (It doesn't exist on my Windows 2000 box - and my
initial 'nmake test' failed because of that reason - $ofh did not get
opened.) If you want to write the '.wsc' file to a temporary folder then I
think the best way is to:

use File::Spec;
my $WSC_DIR = File::Spec->tmpdir;

And I think you should still test the opening of $ofh for success (and die
if it failed):
open my $ofh, '>', $filename or die "Can't open $filename for writing: $!";

With the only other Inline modules that I've used (namely Inline::C and
Inline::CPP), the files that get created by the build process are built in
the ./_Inline directory. My first thought was that the '.wsc' file should
also be written in the ./_Inline directory instead of File::Spec->tmpdir. I
don't know that there's any hard and fast rule about this, however, and if
you were to do it that way then obviously you have to give the module the
capability of creating ./_Inline if that folder doesn't already exist.

I notice that you've started the Makefile.PL with:
use 5.008006;

That's probably a bit limiting, isn't it ? I would think that 'use 5.008;'
would be more in order .... or perhaps even 'use 5.006;' ??

Cheers,
Rob





Posted by jdrago_999 on April 27, 2006, 1:36 pm
Please log in for more thread options


Thanks for the feedback -

Good idea about the tempdir - I'll apply a patch and re-release.


Similar ThreadsPosted
[ANNOUNCE] Inline-C2XS-0.05 November 4, 2006, 7:41 am
[ANNOUNCE] Inline-C2XS-0.05 November 4, 2006, 7:43 am
Inline::Tcl vs. Inline::Tcl August 23, 2006, 12:09 pm
Using a .SO library with Inline January 28, 2005, 12:55 pm
Windows: Perl:Inline July 6, 2005, 4:56 am
How to Install Inline:CPP module July 16, 2005, 12:49 am
Error in Inline C program July 19, 2005, 2:55 am
Installation problems for Inline::C June 21, 2007, 3:32 pm
Getting Path of an external DLL in Perl: Inline C. October 2, 2005, 8:41 pm
Calling C++ / MFC / SDKs usinf Inline July 16, 2005, 12:36 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap