Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

How can I write a Perl script that can dialup to my ISP and connect my computer with the Internet? Somebody asked this same question a couple of weeks ago but the answers were for Unix\Linux. I have been trying to figure out how to dialup in Windows 98 using ActivePerl 5.6.

Replies are listed 'Best First'.
Re: Perl Dialup In Windows
by moen (Hermit) on Nov 08, 2000 at 03:50 UTC
Re: Perl Dialup In Windows
by Anonymous Monk on Nov 08, 2000 at 05:44 UTC
    I got the module Win32::RASE and and am having trouble loading it? After typing the command perl makefile.plon Windows 98 I get the following error message. The path in my autoexec.bat file is set correctly and Perl 5 exists on my computer. There were a couple of perl experts(?) in my office trying to help me figure this out. It would be nice to find this module in ActiveState .ppm format.
    C:\Downloads\RasDial\Win32-RASE-1.01>perl makefile.pl Warning: prerequisite enum 1.014 not found at C:/Perl/lib/ExtUtils/Mak +eMaker.pm line 340. Bad command or file name Bad command or file name Unable to find a perl 5 (by these names: C:\WINDOWS\Perl.exe miniperl +perl perl5 perl5.6.0, in these dirs: C:\ C:\WINDOWS C:\WINDOWS\COMMAND C:\PERL\B +IN C:\PERL \BIN\LIB C:\PERL\BIN\LIB\EXTUTILS C:\JDK C:\JDK\BIN C:\PROGRA~1\INTERN +~1 C:\WIND OWS\SYSTEM\WBEM C:\VXIPNP\WIN95\BIN C:\Perl\bin) Writing Makefile for Win32::RASE
      If you can't find a ppm of the above, you could also try win32::serialport. I know there is a ppm of that available on activestates site, and from reading the write-up in the spring 1999 tpj issue, it appears as though example demo5.plx bundled with this module provides a good starting point for dialing up an ISP..

      I think you'll get this trying to install any CPAN modules under Win9x. I'd love for someone to tell me that I'm wrong.

      Look for a PPM version of this module. Sorry I don't have time to provide a more useful answer at this time.

              - tye (but my friends call me "Tye")
        I am not sure about this. I have managed to install quite a few modules from CPAN on Win98. I have only had one or two problems with CPAN modules.

        However, that reference to miniperl is interesting - I remember something about miniperl in this month's TPJ. I think that miniperl is something to do with building Perl, but I can't rememeber - the article was quite technical and I have never built Perl before!

      Could you please tell us the output of perl -V on your platform? It is very hard to tell what is going on given your information (e.g., where is your perl really?).

      You could try looking up the necessary keys in the registry, and try to change that. Also, in the ExtUtils::MakeMaker documentation they mention some variables that can be used to customize which libraries and executables are used to build a module.

      I suspect that inside the Makefile.PL there is code that calls an external command via the shell (and this won't necessarily have the right environment variables set, since it might not execute your autoexec.bat). I don't know much about Win98, since I am nearly always working on WinNT - are there ways to set environment variables for the whole system, and not just for the current user - ways that don't rely on execution of an autoexec.bat file? Then I'd suggest to try that.

      Christian Lemburg
      Brainbench MVP for Perl
      http://www.brainbench.com

Re: Perl Dialup In Windows
by JohnB (Scribe) on Nov 08, 2000 at 21:24 UTC
    The output of Perl -V and the makefile.pl are shown below:

    Perl -V

    perl -V Summary of my perl5 (revision 5 version 6 subversion 0) configuration: Platform: osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef usethreads=undef use5005threads=undef useithreads=define usemultip ine useperlio=undef d_sfio=undef uselargefiles=undef use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=u Compiler: cc='cl', optimize='-O1 -MD -DNDEBUG', gccversion= cppflags='-DWIN32' ccflags ='-O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_D -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX' stdchar='char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', =4 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -release -libpath:"C:\ ORE" -machine:x86' libpth="C:\Perl\lib\CORE" libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib .lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uui k32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt. libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release -l \Perl\lib\CORE" -machine:x86' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEX LICIT_SYS Locally applied patches: ActivePerl Build 613 Built under MSWin32 Compiled at Mar 24 2000 12:36:25 @INC: C:/Perl/lib C:/Perl/site/lib .

    makefile.pl for Win32::RASE

    use ExtUtils::MakeMaker; # Win32->UNIX CRLF converter for MakeMaker # then usual 'make dist' will convert all ascii files to UNIX format # (I suppose only .dll files might be binary here) $PREOP =<<'EOP'; $(FULLPERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) \ -e "$$dir = $$ARGV[0];use File::Find;" \ -e "find(\&process, $$dir); sub process { return if -d || /\.dll$$/i +;" \ -e "open(I,$$_) || die \"to_unix: can't read file `$$_'\n\";" \ -e "@file = <I>; close I;chmod 0666, $$_;" \ -e "open(O,\">$$_\") || die \"to_unix: can't write file `$$_'\n\";" +\ -e "binmode O;print O map { s/\r\n/\n/;$$_ } @file; close O; }" $* EOP WriteMakefile( "NAME" => "Win32::RASE", "VERSION_FROM" => "RASE.pm", "PREREQ_PM" => { "Win32::API" => 0, "enum" => "1.014" }, ($] < 5.005 ? () : ( "ABSTRACT" => "Managing dialup entries and network connections +on Win32", "AUTHOR" => "Mike Blazer <blazer\@mail.nevalink.ru>", )), "dist" => { COMPRESS => 'gzip -9frN', SUFFIX => 'gz', ($^O eq "MSWin32" ? (PREOP => $PREOP) : ())}, "clean" => { FILES => "./tests pod2* *.html" }, ); sub MY::postamble { my $postamble =<<'END'; html: RASE.pm pod2html --netscape --noindex RASE.pm > RASE.pm.html END $postamble; }
Re: Perl Dialup In Windows
by moen (Hermit) on Nov 09, 2000 at 04:00 UTC
    The above debug dosen't say me mutch so instead of using and compiling Win32::RASE, what about getting the ppm package from activestate (as hinted above) called Win32-rasadmin, witch I just found.
    I don't use win32 right now so i can't tell if it does what you want, but by the name it seems like it could do the trick ;o)
    Should be a painless procedure to install..

    Update: oki, my bad. Seems like it's used for managing RAS servers not RAS connections ...*ack*
Got Win32::RASE To Load
by JohnB (Scribe) on Nov 09, 2000 at 23:43 UTC

    RASE Module Loaded

    1. First I upgraded from ActiveState Perl build 513 to build 520. The makefiles started to work but nmake failed with a warning about ENUM.

    2. Loaded ENUM.PM

    3. nmake now works correctly and I was able to load Win32::RASE


    Thank You for your help