File Under: Haven't done Perl in several hundred years
I have a Perl script I wrote that for now simply "scrapes" an SSL site
and handles its contents:
#!/strawberry/perl/bin/perl
use Crypt::SSLeay;
use WWW::Mechanize;
my $file = "C:\\Documents and Settings\\me\\Desktop\\index.html";
my $mech = WWW::Mechanize->new();
$mech->get('https://www.example.com');
my $content = $mech->content;
if ($content ne "") {
open(HTML, ">$file");
print HTML $content;
close(HTML);
print "file \"$file\" created\n\n";
} else {
print "unable to create file \"$file\"";
}
I am having to include the Crypt::SSLeay package as well as without it
I am prompted to install it. When I do use it I get the following
error:
Can't locate loadable object for Crypt::SSLeay in @INC
Which should I do: install Crypt::SSLeay (if so, how?), or do I try to
find whatever loadable objects exist for Crypt::SSLeay to function?
Thanks
Phil
|
|
0
|
|
|
|
Reply
|
phillip.s.powell (487)
|
2/1/2008 7:45:04 PM |
|
Phil Powell wrote:
[...]
> Can't locate loadable object for Crypt::SSLeay in @INC
>
> Which should I do: install Crypt::SSLeay (if so, how?), or do I try to
> find whatever loadable objects exist for Crypt::SSLeay to function?
Install it. Once it's installed you won't need to 'use' it,
WWW::Mechanize will take care of that for you.
perldoc -q "How do I install a module from CPAN"
|
|
0
|
|
|
|
Reply
|
J
|
2/1/2008 7:49:06 PM
|
|
I don't have perldoc nor do I have ppm. I'm using Strawberry Perl.
ActivePerl is blocked from our servers here so I cannot download
ActivePerl.
On Feb 1, 2:49=A0pm, "J. Gleixner" <glex_no-s...@qwest-spam-no.invalid>
wrote:
> Phil Powell wrote:
>
> [...]
>
> > Can't locate loadable object for Crypt::SSLeay in @INC
>
> > Which should I do: install Crypt::SSLeay (if so, how?), or do I try to
> > find whatever loadable objects exist for Crypt::SSLeay to function?
>
> Install it. =A0Once it's installed you won't need to 'use' it,
> WWW::Mechanize will take care of that for you.
>
> perldoc -q "How do I install a module from CPAN"
|
|
0
|
|
|
|
Reply
|
Phil
|
2/1/2008 8:15:13 PM
|
|
Phil Powell <phillip.s.powell@gmail.com> writes:
> I don't have perldoc nor do I have ppm. I'm using Strawberry Perl.
> ActivePerl is blocked from our servers here so I cannot download
> ActivePerl.
strawberry perl has a working CPAN installer (it's in the start menu for
strawberry perl somewhere).
Just start that and type "install Crypt::SSLeay".
Note: chances are relatively high this won't work out of the box - but I
haven't tested it.
Joost.
|
|
0
|
|
|
|
Reply
|
Joost
|
2/1/2008 8:44:41 PM
|
|
Phil Powell wrote:
> On Feb 1, 2:49 pm, "J. Gleixner" <glex_no-s...@qwest-spam-no.invalid>
> wrote:
>> Phil Powell wrote:
>>
>> [...]
>>
>>> Can't locate loadable object for Crypt::SSLeay in @INC
>>> Which should I do: install Crypt::SSLeay (if so, how?), or do I try to
>>> find whatever loadable objects exist for Crypt::SSLeay to function?
>> Install it. Once it's installed you won't need to 'use' it,
>> WWW::Mechanize will take care of that for you.
>>
>> perldoc -q "How do I install a module from CPAN"
>
> I don't have perldoc nor do I have ppm. I'm using Strawberry Perl.
> ActivePerl is blocked from our servers here so I cannot download
> ActivePerl.
>
Who said anything about ppm or ActivePerl?
You do have access to the Internet, right? The documentation
is available online, at many sites.
e.g.
http://search.cpan.org/dist/perl/pod/perlmodinstall.pod
Never heard of Strawberry Perl, but doing a quick search
shows:
"The purpose of the Strawberry Perl series is to provide a practical
Win32 Perl environment for experienced Perl developers to experiment
with and test the installation of various CPAN modules under Win32
conditions, and to provide a useful platform for doing real work."
Which would seem to indicate that you can install modules
from CPAN.
|
|
0
|
|
|
|
Reply
|
J
|
2/1/2008 8:46:39 PM
|
|
I figured out how to try to install Crypt::SSLeay from within CPAN
Client, however, attempts to install failed as nearly every FTP site
is blocked (FTP is disabled here at work). Are there other ways to
install Crypt::SSLeay?
On Feb 1, 3:44=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> Phil Powell <phillip.s.pow...@gmail.com> writes:
> > I don't have perldoc nor do I have ppm. =A0I'm using Strawberry Perl.
> > ActivePerl is blocked from our servers here so I cannot download
> > ActivePerl.
>
> strawberry perl has a working CPAN installer (it's in the start menu for
> strawberry perl somewhere).
>
> Just start that and type "install Crypt::SSLeay".
>
> Note: chances are relatively high this won't work out of the box - but I
> haven't tested it.
>
> Joost.
|
|
0
|
|
|
|
Reply
|
Phil
|
2/1/2008 8:48:19 PM
|
|
Phil Powell <phillip.s.powell@gmail.com> writes:
> I figured out how to try to install Crypt::SSLeay from within CPAN
> Client, however, attempts to install failed as nearly every FTP site
> is blocked (FTP is disabled here at work). Are there other ways to
> install Crypt::SSLeay?
Strawberry perl *should* provide all the means you need to install cpan
tarballs. Download the thing from CPAN yourself and then do the usual
stuff.
http://www.cpan.org/modules/INSTALL.html
Also, please put your replies at the end of the relevant quotes, where
they belong.
Joost.
|
|
0
|
|
|
|
Reply
|
Joost
|
2/1/2008 8:51:47 PM
|
|
On Feb 1, 3:51=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> Phil Powell <phillip.s.pow...@gmail.com> writes:
> > I figured out how to try to install Crypt::SSLeay from within CPAN
> > Client, however, attempts to install failed as nearly every FTP site
> > is blocked (FTP is disabled here at work). =A0Are there other ways to
> > install Crypt::SSLeay?
>
> Strawberry perl *should* provide all the means you need to install cpan
> tarballs. Download the thing from CPAN yourself and then do the usual
> stuff.
>
> http://www.cpan.org/modules/INSTALL.html
Upon doing so, I am prompted (via the instructions to run Makefile.PL)
to provide the directory where the SSL Headers are located, using as
default "C:\openssl". Where would I find the appropriate SSL Headers
in order to accomplish this?
>
> Also, please put your replies at the end of the relevant quotes, where
> they belong.
>
> Joost.
|
|
0
|
|
|
|
Reply
|
Phil
|
2/1/2008 8:57:41 PM
|
|
Phil Powell <phillip.s.powell@gmail.com> writes:
>> Strawberry perl *should* provide all the means you need to install cpan
>> tarballs. Download the thing from CPAN yourself and then do the usual
>> stuff.
>>
>> http://www.cpan.org/modules/INSTALL.html
>
> Upon doing so, I am prompted (via the instructions to run Makefile.PL)
> to provide the directory where the SSL Headers are located, using as
> default "C:\openssl". Where would I find the appropriate SSL Headers
> in order to accomplish this?
>
See:
http://search.cpan.org/src/DLAND/Crypt-SSLeay-0.57/README
Specifically:
"You must have OpenSSL or SSLeay installed before compiling this module.
You can get the latest OpenSSL package from:
http://www.openssl.org"
As a general note, installing XS modules (especially ones that require
additional libraries) on strawberry perl is possible but not exactly
painless. strawberry provides only just about the minimum of
infrastructure to support this.
Activeperl's ppm packages are a *lot* friendlier to use, and you should
reconsider your judgement if the only reason you're using it is that the
activestate site is blocked. Get your manager to fix that.
Joost.
|
|
0
|
|
|
|
Reply
|
Joost
|
2/1/2008 9:11:35 PM
|
|
On Feb 1, 4:11=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> Phil Powell <phillip.s.pow...@gmail.com> writes:
> >> Strawberry perl *should* provide all the means you need to install cpan=
> >> tarballs. Download the thing from CPAN yourself and then do the usual
> >> stuff.
>
> >>http://www.cpan.org/modules/INSTALL.html
>
> > Upon doing so, I am prompted (via the instructions to run Makefile.PL)
> > to provide the directory where the SSL Headers are located, using as
> > default "C:\openssl". =A0Where would I find the appropriate SSL Headers
> > in order to accomplish this?
>
> See:http://search.cpan.org/src/DLAND/Crypt-SSLeay-0.57/README
>
> Specifically:
>
> =A0 =A0"You must have OpenSSL or SSLeay installed before compiling this mo=
dule.
> =A0 =A0 You can get the latest OpenSSL package from:
>
> =A0 =A0 =A0http://www.openssl.org"
Can you point me to a stable version of OpenSSL to use? Went to the
site and attempted to download openssl-0.9.6.tar.gz only to get a
corrupted .tar.tar file instead every time.
>
> As a general note, installing XS modules (especially ones that require
> additional libraries) on strawberry perl is possible but not exactly
> painless. strawberry provides only just about the minimum of
> infrastructure to support this.
>
> Activeperl's ppm packages are a *lot* friendlier to use, and you should
> reconsider your judgement if the only reason you're using it is that the
> activestate site is blocked. Get your manager to fix that.
That is impossible due to the fact that where I work at is under
Federal regulation to block certain sites including, apparently,
ActiveState. Illegal to run them here. I work for a U.S. Federal
Government agency.
>
> Joost.
|
|
0
|
|
|
|
Reply
|
Phil
|
2/1/2008 9:16:11 PM
|
|
Phil Powell <phillip.s.powell@gmail.com> writes:
> On Feb 1, 4:11 pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
>> Phil Powell <phillip.s.pow...@gmail.com> writes:
>> >> Strawberry perl *should* provide all the means you need to install cpan
>> >> tarballs. Download the thing from CPAN yourself and then do the usual
>> >> stuff.
>>
>> >>http://www.cpan.org/modules/INSTALL.html
>>
>> > Upon doing so, I am prompted (via the instructions to run Makefile.PL)
>> > to provide the directory where the SSL Headers are located, using as
>> > default "C:\openssl". Where would I find the appropriate SSL Headers
>> > in order to accomplish this?
>>
>> See:http://search.cpan.org/src/DLAND/Crypt-SSLeay-0.57/README
>>
>> Specifically:
>>
>> "You must have OpenSSL or SSLeay installed before compiling this module.
>> You can get the latest OpenSSL package from:
>>
>> http://www.openssl.org"
>
> Can you point me to a stable version of OpenSSL to use? Went to the
> site and attempted to download openssl-0.9.6.tar.gz only to get a
> corrupted .tar.tar file instead every time.
Get a decent browser or rename it back to tar.gz / rename it to .tar. I
forget which is the correct solution. MSIE fucks with .gz extensions.
Also, google for "openssl windows" would have found:
http://www.openssl.org/related/binaries.html
which points to
http://www.slproweb.com/products/Win32OpenSSL.html
You will probably want
http://www.slproweb.com/download/Win32OpenSSL-0_9_8g.exe
"Note that this is a default build of OpenSSL and is
subject to local and state laws. More information can
be found in the legal agreement of the installation."
>> As a general note, installing XS modules (especially ones that require
>> additional libraries) on strawberry perl is possible but not exactly
>> painless. strawberry provides only just about the minimum of
>> infrastructure to support this.
>>
>> Activeperl's ppm packages are a *lot* friendlier to use, and you should
>> reconsider your judgement if the only reason you're using it is that the
>> activestate site is blocked. Get your manager to fix that.
>
> That is impossible due to the fact that where I work at is under
> Federal regulation to block certain sites including, apparently,
> ActiveState. Illegal to run them here. I work for a U.S. Federal
> Government agency.
Hah. Figures :-)
|
|
0
|
|
|
|
Reply
|
Joost
|
2/1/2008 9:21:03 PM
|
|
Phil Powell <phillip.s.powell@gmail.com> wrote:
>I don't have perldoc [...].
Then your Perl installation is seriously broken. Programming in a system
without the most basic documentation is probably not very productive. You
might want to fix that.
jue
|
|
0
|
|
|
|
Reply
|
J
|
2/1/2008 9:42:14 PM
|
|
On Feb 1, 4:21=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> Phil Powell <phillip.s.pow...@gmail.com> writes:
> > On Feb 1, 4:11=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> >> Phil Powell <phillip.s.pow...@gmail.com> writes:
> >> >> Strawberry perl *should* provide all the means you need to install c=
pan
> >> >> tarballs. Download the thing from CPAN yourself and then do the usua=
l
> >> >> stuff.
>
> >> >>http://www.cpan.org/modules/INSTALL.html
>
> >> > Upon doing so, I am prompted (via the instructions to run Makefile.PL=
)
> >> > to provide the directory where the SSL Headers are located, using as
> >> > default "C:\openssl". =A0Where would I find the appropriate SSL Heade=
rs
> >> > in order to accomplish this?
>
> >> See:http://search.cpan.org/src/DLAND/Crypt-SSLeay-0.57/README
>
> >> Specifically:
>
> >> =A0 =A0"You must have OpenSSL or SSLeay installed before compiling this=
module.
> >> =A0 =A0 You can get the latest OpenSSL package from:
>
> >> =A0 =A0 =A0http://www.openssl.org"
>
> > Can you point me to a stable version of OpenSSL to use? Went to the
> > site and attempted to download openssl-0.9.6.tar.gz only to get a
> > corrupted .tar.tar file instead every time.
>
> Get a decent browser or rename it back to tar.gz / rename it to .tar. I
> forget which is the correct solution. MSIE fucks with .gz extensions.
>
> Also, google for "openssl windows" would have found:http://www.openssl.org=
/related/binaries.html
> which points tohttp://www.slproweb.com/products/Win32OpenSSL.html
>
> You will probably wanthttp://www.slproweb.com/download/Win32OpenSSL-0_9_8g=
..exe
>
> =A0"Note that this is a default build of OpenSSL and is
> =A0 subject to local and state laws. More information can
> =A0 be found in the legal agreement of the installation."
Thanks the Win32OpenSSL exe auto-install worked inasmuch as I seem to
be able to get a little farther with attempting to install
Crypt::SSLeay; I now get the following error:
cpan> ! require "C:\\strawberry\\perl\\lib\\Crypt\\Makefile.PL"
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
Only one OpenSSL installation found at c:\openssl
Consider running 'perl Makefile.PL --default' the next
time Crypt::SSLeay is upgraded to select this directory
automatically thereby avoiding the following prompt.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D
Which SSL install path do you want to use? [c:\openssl]
Assuming Vanilla/Strawberry Perl installation
BUILD INFORMATION
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
ssl library: OpenSSL 0.9.8 in c:\openssl
ssl header: openssl/ssl.h
libraries: -Lc:\openssl\lib\MinGW -lssleay32 -llibeay32
include dir: -Ic:\openssl\include
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Could not open 'SSLeay.pm': No such file or directory at C:/strawberry/
perl/lib/
ExtUtils/MM_Unix.pm line 2698, <STDIN> line 1.
Compilation failed in require at (eval 15) line 1, <STDIN> line 1.
Where would I place SSLeay.pm in order for it to be found? I have it
within C:/strawberry/perl/lib and at C:/strawberry/perl/lib/Crypt
>
> >> As a general note, installing XS modules (especially ones that require
> >> additional libraries) on strawberry perl is possible but not exactly
> >> painless. strawberry provides only just about the minimum of
> >> infrastructure to support this.
>
> >> Activeperl's ppm packages are a *lot* friendlier to use, and you should=
> >> reconsider your judgement if the only reason you're using it is that th=
e
> >> activestate site is blocked. Get your manager to fix that.
>
> > That is impossible due to the fact that where I work at is under
> > Federal regulation to block certain sites including, apparently,
> > ActiveState. =A0Illegal to run them here. =A0I work for a U.S. Federal
> > Government agency.
>
> Hah. Figures :-)- Hide quoted text -
I get that a lot ;)
>
> - Show quoted text -
|
|
0
|
|
|
|
Reply
|
Phil
|
2/1/2008 9:54:49 PM
|
|
Phil Powell <phillip.s.powell@gmail.com> writes:
> On Feb 1, 4:21 pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
>> Phil Powell <phillip.s.pow...@gmail.com> writes:
>> > On Feb 1, 4:11 pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
>> >> Phil Powell <phillip.s.pow...@gmail.com> writes:
>> >> >> Strawberry perl *should* provide all the means you need to install cpan
>> >> >> tarballs. Download the thing from CPAN yourself and then do the usual
>> >> >> stuff.
>>
>> >> >>http://www.cpan.org/modules/INSTALL.html
>>
>> >> > Upon doing so, I am prompted (via the instructions to run Makefile.PL)
>> >> > to provide the directory where the SSL Headers are located, using as
>> >> > default "C:\openssl". Where would I find the appropriate SSL Headers
>> >> > in order to accomplish this?
>>
>> >> See:http://search.cpan.org/src/DLAND/Crypt-SSLeay-0.57/README
>>
>> >> Specifically:
>>
>> >> "You must have OpenSSL or SSLeay installed before compiling this module.
>> >> You can get the latest OpenSSL package from:
>>
>> >> http://www.openssl.org"
>>
>> > Can you point me to a stable version of OpenSSL to use? Went to the
>> > site and attempted to download openssl-0.9.6.tar.gz only to get a
>> > corrupted .tar.tar file instead every time.
>>
>> Get a decent browser or rename it back to tar.gz / rename it to .tar. I
>> forget which is the correct solution. MSIE fucks with .gz extensions.
>>
>> Also, google for "openssl windows" would have found:http://www.openssl.org/related/binaries.html
>> which points tohttp://www.slproweb.com/products/Win32OpenSSL.html
>>
>> You will probably wanthttp://www.slproweb.com/download/Win32OpenSSL-0_9_8g.exe
>>
>> "Note that this is a default build of OpenSSL and is
>> subject to local and state laws. More information can
>> be found in the legal agreement of the installation."
>
> Thanks the Win32OpenSSL exe auto-install worked inasmuch as I seem to
> be able to get a little farther with attempting to install
> Crypt::SSLeay; I now get the following error:
>
> cpan> ! require "C:\\strawberry\\perl\\lib\\Crypt\\Makefile.PL"
> =======================================================
> Only one OpenSSL installation found at c:\openssl
> Consider running 'perl Makefile.PL --default' the next
> time Crypt::SSLeay is upgraded to select this directory
> automatically thereby avoiding the following prompt.
> =======================================================
> Which SSL install path do you want to use? [c:\openssl]
> Assuming Vanilla/Strawberry Perl installation
>
> BUILD INFORMATION
> ================================================
> ssl library: OpenSSL 0.9.8 in c:\openssl
> ssl header: openssl/ssl.h
> libraries: -Lc:\openssl\lib\MinGW -lssleay32 -llibeay32
> include dir: -Ic:\openssl\include
> ================================================
> Could not open 'SSLeay.pm': No such file or directory at C:/strawberry/
> perl/lib/
> ExtUtils/MM_Unix.pm line 2698, <STDIN> line 1.
> Compilation failed in require at (eval 15) line 1, <STDIN> line 1.
>
>
>
> Where would I place SSLeay.pm in order for it to be found? I have it
> within C:/strawberry/perl/lib and at C:/strawberry/perl/lib/Crypt
It shouldn't be there before you've installed it.
Just unpack the tar.gz file anywhere, cd into the directory and run
perl Makefile.PL
make
make test
make install
substitude nmake, or whatever make strawberry provides for "make" if that
won't work - it's in strawberry/c/bin.
Joost.
|
|
0
|
|
|
|
Reply
|
Joost
|
2/1/2008 10:01:07 PM
|
|
On Feb 1, 5:01=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> Phil Powell <phillip.s.pow...@gmail.com> writes:
> > On Feb 1, 4:21=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> >> Phil Powell <phillip.s.pow...@gmail.com> writes:
> >> > On Feb 1, 4:11=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> >> >> Phil Powell <phillip.s.pow...@gmail.com> writes:
> >> >> >> Strawberry perl *should* provide all the means you need to instal=
l cpan
> >> >> >> tarballs. Download the thing from CPAN yourself and then do the u=
sual
> >> >> >> stuff.
>
> >> >> >>http://www.cpan.org/modules/INSTALL.html
>
> >> >> > Upon doing so, I am prompted (via the instructions to run Makefile=
..PL)
> >> >> > to provide the directory where the SSL Headers are located, using =
as
> >> >> > default "C:\openssl". =A0Where would I find the appropriate SSL He=
aders
> >> >> > in order to accomplish this?
>
> >> >> See:http://search.cpan.org/src/DLAND/Crypt-SSLeay-0.57/README
>
> >> >> Specifically:
>
> >> >> =A0 =A0"You must have OpenSSL or SSLeay installed before compiling t=
his module.
> >> >> =A0 =A0 You can get the latest OpenSSL package from:
>
> >> >> =A0 =A0 =A0http://www.openssl.org"
>
> >> > Can you point me to a stable version of OpenSSL to use? Went to the
> >> > site and attempted to download openssl-0.9.6.tar.gz only to get a
> >> > corrupted .tar.tar file instead every time.
>
> >> Get a decent browser or rename it back to tar.gz / rename it to .tar. I=
> >> forget which is the correct solution. MSIE fucks with .gz extensions.
>
> >> Also, google for "openssl windows" would have found:http://www.openssl.=
org/related/binaries.html
> >> which points tohttp://www.slproweb.com/products/Win32OpenSSL.html
>
> >> You will probably wanthttp://www.slproweb.com/download/Win32OpenSSL-0_9=
_8g.exe
>
> >> =A0"Note that this is a default build of OpenSSL and is
> >> =A0 subject to local and state laws. More information can
> >> =A0 be found in the legal agreement of the installation."
>
> > Thanks the Win32OpenSSL exe auto-install worked inasmuch as I seem to
> > be able to get a little farther with attempting to install
> > Crypt::SSLeay; I now get the following error:
>
> > cpan> ! require "C:\\strawberry\\perl\\lib\\Crypt\\Makefile.PL"
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
> > Only one OpenSSL installation found at c:\openssl
> > Consider running 'perl Makefile.PL --default' the next
> > time Crypt::SSLeay is upgraded to select this directory
> > automatically thereby avoiding the following prompt.
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
> > Which SSL install path do you want to use? [c:\openssl]
> > Assuming Vanilla/Strawberry Perl installation
>
> > BUILD INFORMATION
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > ssl library: OpenSSL 0.9.8 in c:\openssl
> > ssl header: =A0openssl/ssl.h
> > libraries: =A0 -Lc:\openssl\lib\MinGW -lssleay32 -llibeay32
> > include dir: -Ic:\openssl\include
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > Could not open 'SSLeay.pm': No such file or directory at C:/strawberry/
> > perl/lib/
> > ExtUtils/MM_Unix.pm line 2698, <STDIN> line 1.
> > Compilation failed in require at (eval 15) line 1, <STDIN> line 1.
>
> > Where would I place SSLeay.pm in order for it to be found? I have it
> > within C:/strawberry/perl/lib and at C:/strawberry/perl/lib/Crypt
>
> It shouldn't be there before you've installed it.
>
> Just unpack the tar.gz file anywhere, cd into the directory and run
>
> perl Makefile.PL
> make
> make test
> make install
>
> substitude =A0nmake, or whatever make strawberry provides for "make" if th=
at
> won't work - it's in strawberry/c/bin.
Yeah it turned out to be "dmake" instead of "make" or "nmake".
However, now I get the error "The application failed to run because
VSINIT.dll was not found"
>
> Joost.- Hide quoted text -
>
> - Show quoted text -
|
|
0
|
|
|
|
Reply
|
Phil
|
2/1/2008 10:12:33 PM
|
|
On Feb 1, 5:01=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> Phil Powell <phillip.s.pow...@gmail.com> writes:
> > On Feb 1, 4:21=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> >> Phil Powell <phillip.s.pow...@gmail.com> writes:
> >> > On Feb 1, 4:11=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> >> >> Phil Powell <phillip.s.pow...@gmail.com> writes:
> >> >> >> Strawberry perl *should* provide all the means you need to instal=
l cpan
> >> >> >> tarballs. Download the thing from CPAN yourself and then do the u=
sual
> >> >> >> stuff.
>
> >> >> >>http://www.cpan.org/modules/INSTALL.html
>
> >> >> > Upon doing so, I am prompted (via the instructions to run Makefile=
..PL)
> >> >> > to provide the directory where the SSL Headers are located, using =
as
> >> >> > default "C:\openssl". =A0Where would I find the appropriate SSL He=
aders
> >> >> > in order to accomplish this?
>
> >> >> See:http://search.cpan.org/src/DLAND/Crypt-SSLeay-0.57/README
>
> >> >> Specifically:
>
> >> >> =A0 =A0"You must have OpenSSL or SSLeay installed before compiling t=
his module.
> >> >> =A0 =A0 You can get the latest OpenSSL package from:
>
> >> >> =A0 =A0 =A0http://www.openssl.org"
>
> >> > Can you point me to a stable version of OpenSSL to use? Went to the
> >> > site and attempted to download openssl-0.9.6.tar.gz only to get a
> >> > corrupted .tar.tar file instead every time.
>
> >> Get a decent browser or rename it back to tar.gz / rename it to .tar. I=
> >> forget which is the correct solution. MSIE fucks with .gz extensions.
>
> >> Also, google for "openssl windows" would have found:http://www.openssl.=
org/related/binaries.html
> >> which points tohttp://www.slproweb.com/products/Win32OpenSSL.html
>
> >> You will probably wanthttp://www.slproweb.com/download/Win32OpenSSL-0_9=
_8g.exe
>
> >> =A0"Note that this is a default build of OpenSSL and is
> >> =A0 subject to local and state laws. More information can
> >> =A0 be found in the legal agreement of the installation."
>
> > Thanks the Win32OpenSSL exe auto-install worked inasmuch as I seem to
> > be able to get a little farther with attempting to install
> > Crypt::SSLeay; I now get the following error:
>
> > cpan> ! require "C:\\strawberry\\perl\\lib\\Crypt\\Makefile.PL"
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
> > Only one OpenSSL installation found at c:\openssl
> > Consider running 'perl Makefile.PL --default' the next
> > time Crypt::SSLeay is upgraded to select this directory
> > automatically thereby avoiding the following prompt.
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
> > Which SSL install path do you want to use? [c:\openssl]
> > Assuming Vanilla/Strawberry Perl installation
>
> > BUILD INFORMATION
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > ssl library: OpenSSL 0.9.8 in c:\openssl
> > ssl header: =A0openssl/ssl.h
> > libraries: =A0 -Lc:\openssl\lib\MinGW -lssleay32 -llibeay32
> > include dir: -Ic:\openssl\include
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > Could not open 'SSLeay.pm': No such file or directory at C:/strawberry/
> > perl/lib/
> > ExtUtils/MM_Unix.pm line 2698, <STDIN> line 1.
> > Compilation failed in require at (eval 15) line 1, <STDIN> line 1.
>
> > Where would I place SSLeay.pm in order for it to be found? I have it
> > within C:/strawberry/perl/lib and at C:/strawberry/perl/lib/Crypt
>
> It shouldn't be there before you've installed it.
>
> Just unpack the tar.gz file anywhere, cd into the directory and run
>
> perl Makefile.PL
> make
> make test
> make install
>
> substitude =A0nmake, or whatever make strawberry provides for "make" if th=
at
> won't work - it's in strawberry/c/bin.
I downloaded nmake.exe and placed it into the strawberry/c/bin
directory. Upon running it I was able to get to the point where I
could get now THIS error:
C:\strawberry\perl\lib\Crypt>nmake /E
Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
gcc -c -Ic:\openssl\include -s -O2 -DWIN32 -DHAVE_DES_FCRYPT
-DPERL_IM
PLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -
DPERL_MSVCRT_READFIX -s
-O2 -DVERSION=3D\"0.57\" -DXS_VERSION=3D\"0.57\" "-IC:\strawberry
\perl\lib\COR
E" SSLeay.c
Can't find string terminator "}" anywhere before EOF at -e line 1.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code
'0xff'
Stop.
C:\strawberry\perl\lib\Crypt>nmake test
Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
Can't find string terminator "}" anywhere before EOF at -e line 1.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code
'0xff'
Stop.
C:\strawberry\perl\lib\Crypt>nmake install
Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
Can't find string terminator "}" anywhere before EOF at -e line 1.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code
'0xff'
Stop.
>
> Joost.- Hide quoted text -
>
> - Show quoted text -
|
|
0
|
|
|
|
Reply
|
Phil
|
2/1/2008 10:54:16 PM
|
|
On Feb 1, 5:12=A0pm, Phil Powell <phillip.s.pow...@gmail.com> wrote:
> On Feb 1, 5:01=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
>
>
>
>
>
> > Phil Powell <phillip.s.pow...@gmail.com> writes:
> > > On Feb 1, 4:21=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> > >> Phil Powell <phillip.s.pow...@gmail.com> writes:
> > >> > On Feb 1, 4:11=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> > >> >> Phil Powell <phillip.s.pow...@gmail.com> writes:
> > >> >> >> Strawberry perl *should* provide all the means you need to inst=
all cpan
> > >> >> >> tarballs. Download the thing from CPAN yourself and then do the=
usual
> > >> >> >> stuff.
>
> > >> >> >>http://www.cpan.org/modules/INSTALL.html
>
> > >> >> > Upon doing so, I am prompted (via the instructions to run Makefi=
le.PL)
> > >> >> > to provide the directory where the SSL Headers are located, usin=
g as
> > >> >> > default "C:\openssl". =A0Where would I find the appropriate SSL =
Headers
> > >> >> > in order to accomplish this?
>
> > >> >> See:http://search.cpan.org/src/DLAND/Crypt-SSLeay-0.57/README
>
> > >> >> Specifically:
>
> > >> >> =A0 =A0"You must have OpenSSL or SSLeay installed before compiling=
this module.
> > >> >> =A0 =A0 You can get the latest OpenSSL package from:
>
> > >> >> =A0 =A0 =A0http://www.openssl.org"
>
> > >> > Can you point me to a stable version of OpenSSL to use? Went to the=
> > >> > site and attempted to download openssl-0.9.6.tar.gz only to get a
> > >> > corrupted .tar.tar file instead every time.
>
> > >> Get a decent browser or rename it back to tar.gz / rename it to .tar.=
I
> > >> forget which is the correct solution. MSIE fucks with .gz extensions.=
>
> > >> Also, google for "openssl windows" would have found:http://www.openss=
l.org/related/binaries.html
> > >> which points tohttp://www.slproweb.com/products/Win32OpenSSL.html
>
> > >> You will probably wanthttp://www.slproweb.com/download/Win32OpenSSL-0=
_9_8g.exe
>
> > >> =A0"Note that this is a default build of OpenSSL and is
> > >> =A0 subject to local and state laws. More information can
> > >> =A0 be found in the legal agreement of the installation."
>
> > > Thanks the Win32OpenSSL exe auto-install worked inasmuch as I seem to
> > > be able to get a little farther with attempting to install
> > > Crypt::SSLeay; I now get the following error:
>
> > > cpan> ! require "C:\\strawberry\\perl\\lib\\Crypt\\Makefile.PL"
> > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
> > > Only one OpenSSL installation found at c:\openssl
> > > Consider running 'perl Makefile.PL --default' the next
> > > time Crypt::SSLeay is upgraded to select this directory
> > > automatically thereby avoiding the following prompt.
> > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
> > > Which SSL install path do you want to use? [c:\openssl]
> > > Assuming Vanilla/Strawberry Perl installation
>
> > > BUILD INFORMATION
> > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > > ssl library: OpenSSL 0.9.8 in c:\openssl
> > > ssl header: =A0openssl/ssl.h
> > > libraries: =A0 -Lc:\openssl\lib\MinGW -lssleay32 -llibeay32
> > > include dir: -Ic:\openssl\include
> > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > > Could not open 'SSLeay.pm': No such file or directory at C:/strawberry=
/
> > > perl/lib/
> > > ExtUtils/MM_Unix.pm line 2698, <STDIN> line 1.
> > > Compilation failed in require at (eval 15) line 1, <STDIN> line 1.
>
> > > Where would I place SSLeay.pm in order for it to be found? I have it
> > > within C:/strawberry/perl/lib and at C:/strawberry/perl/lib/Crypt
>
> > It shouldn't be there before you've installed it.
>
> > Just unpack the tar.gz file anywhere, cd into the directory and run
>
> > perl Makefile.PL
> > make
> > make test
> > make install
>
> > substitude =A0nmake, or whatever make strawberry provides for "make" if =
that
> > won't work - it's in strawberry/c/bin.
>
> Yeah it turned out to be "dmake" instead of "make" or "nmake".
>
> However, now I get the error "The application failed to run because
> VSINIT.dll was not found"
>
Ok I found and downloaded VSINIT.dll, but now I get the following
error:
"The procedure entry point SSLv2_client_method could not be located in
the dynamic link library ssleay32.dll"
>
>
>
>
> > Joost.- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
|
|
0
|
|
|
|
Reply
|
Phil
|
2/1/2008 10:55:03 PM
|
|
On Feb 1, 5:55=A0pm, Phil Powell <phillip.s.pow...@gmail.com> wrote:
> On Feb 1, 5:12=A0pm, Phil Powell <phillip.s.pow...@gmail.com> wrote:
>
>
>
>
>
> > On Feb 1, 5:01=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
>
> > > Phil Powell <phillip.s.pow...@gmail.com> writes:
> > > > On Feb 1, 4:21=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> > > >> Phil Powell <phillip.s.pow...@gmail.com> writes:
> > > >> > On Feb 1, 4:11=A0pm, Joost Diepenmaat <jo...@zeekat.nl> wrote:
> > > >> >> Phil Powell <phillip.s.pow...@gmail.com> writes:
> > > >> >> >> Strawberry perl *should* provide all the means you need to in=
stall cpan
> > > >> >> >> tarballs. Download the thing from CPAN yourself and then do t=
he usual
> > > >> >> >> stuff.
>
> > > >> >> >>http://www.cpan.org/modules/INSTALL.html
>
> > > >> >> > Upon doing so, I am prompted (via the instructions to run Make=
file.PL)
> > > >> >> > to provide the directory where the SSL Headers are located, us=
ing as
> > > >> >> > default "C:\openssl". =A0Where would I find the appropriate SS=
L Headers
> > > >> >> > in order to accomplish this?
>
> > > >> >> See:http://search.cpan.org/src/DLAND/Crypt-SSLeay-0.57/README
>
> > > >> >> Specifically:
>
> > > >> >> =A0 =A0"You must have OpenSSL or SSLeay installed before compili=
ng this module.
> > > >> >> =A0 =A0 You can get the latest OpenSSL package from:
>
> > > >> >> =A0 =A0 =A0http://www.openssl.org"
>
> > > >> > Can you point me to a stable version of OpenSSL to use? Went to t=
he
> > > >> > site and attempted to download openssl-0.9.6.tar.gz only to get a=
> > > >> > corrupted .tar.tar file instead every time.
>
> > > >> Get a decent browser or rename it back to tar.gz / rename it to .ta=
r. I
> > > >> forget which is the correct solution. MSIE fucks with .gz extension=
s.
>
> > > >> Also, google for "openssl windows" would have found:http://www.open=
ssl.org/related/binaries.html
> > > >> which points tohttp://www.slproweb.com/products/Win32OpenSSL.html
>
> > > >> You will probably wanthttp://www.slproweb.com/download/Win32OpenSSL=
-0_9_8g.exe
>
> > > >> =A0"Note that this is a default build of OpenSSL and is
> > > >> =A0 subject to local and state laws. More information can
> > > >> =A0 be found in the legal agreement of the installation."
>
> > > > Thanks the Win32OpenSSL exe auto-install worked inasmuch as I seem t=
o
> > > > be able to get a little farther with attempting to install
> > > > Crypt::SSLeay; I now get the following error:
>
> > > > cpan> ! require "C:\\strawberry\\perl\\lib\\Crypt\\Makefile.PL"
> > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
> > > > Only one OpenSSL installation found at c:\openssl
> > > > Consider running 'perl Makefile.PL --default' the next
> > > > time Crypt::SSLeay is upgraded to select this directory
> > > > automatically thereby avoiding the following prompt.
> > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
> > > > Which SSL install path do you want to use? [c:\openssl]
> > > > Assuming Vanilla/Strawberry Perl installation
>
> > > > BUILD INFORMATION
> > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
> > > > ssl library: OpenSSL 0.9.8 in c:\openssl
> > > > ssl header: =A0openssl/ssl.h
> > > > libraries: =A0 -Lc:\openssl\lib\MinGW -lssleay32 -llibeay32
> > > > include dir: -Ic:\openssl\include
> > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
> > > > Could not open 'SSLeay.pm': No such file or directory at C:/strawber=
ry/
> > > > perl/lib/
> > > > ExtUtils/MM_Unix.pm line 2698, <STDIN> line 1.
> > > > Compilation failed in require at (eval 15) line 1, <STDIN> line 1.
>
> > > > Where would I place SSLeay.pm in order for it to be found? I have it=
> > > > within C:/strawberry/perl/lib and at C:/strawberry/perl/lib/Crypt
>
> > > It shouldn't be there before you've installed it.
>
> > > Just unpack the tar.gz file anywhere, cd into the directory and run
>
> > > perl Makefile.PL
> > > make
> > > make test
> > > make install
>
> > > substitude =A0nmake, or whatever make strawberry provides for "make" i=
f that
> > > won't work - it's in strawberry/c/bin.
>
> > Yeah it turned out to be "dmake" instead of "make" or "nmake".
>
> > However, now I get the error "The application failed to run because
> > VSINIT.dll was not found"
>
> Ok I found and downloaded VSINIT.dll, but now I get the following
> error:
>
> "The procedure entry point SSLv2_client_method could not be located in
> the dynamic link library ssleay32.dll"
>
>
>
>
>
> > > Joost.- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
Got it!! I uninstalled everything, OpenSSL, Crypt, everything (but
Perl itself), wiped out directories and started from scratch. Got the
latest OpenSSL 0.9.8g Win32 bundle autoexec, then re-downloaded
Crypt::SSLeay, and from the newly-created Crypt folder created from
unbundling the tarball:
perl Makefile.PL
dmake
dmake test
dmake install
Everything ran perfectly!
|
|
0
|
|
|
|
Reply
|
Phil
|
2/1/2008 11:33:04 PM
|
|
Phil Powell <phillip.s.powell@gmail.com> writes:
> Got it!! I uninstalled everything, OpenSSL, Crypt, everything (but
> Perl itself), wiped out directories and started from scratch. Got the
> latest OpenSSL 0.9.8g Win32 bundle autoexec, then re-downloaded
> Crypt::SSLeay, and from the newly-created Crypt folder created from
> unbundling the tarball:
>
> perl Makefile.PL
> dmake
> dmake test
> dmake install
>
> Everything ran perfectly!
That's good to know. :-)
I spend the day trying everything to install Wx, Tk and Gtk2 on
strawberry, and finally gave up and settled for Tk on activestate perl.
Joost.
|
|
0
|
|
|
|
Reply
|
Joost
|
2/1/2008 11:38:31 PM
|
|
Phil Powell <phillip.s.powell@gmail.com> wrote:
> my $mech = WWW::Mechanize->new();
> $mech->get('https://www.example.com');
> my $content = $mech->content;
>
> if ($content ne "") {
> open(HTML, ">$file");
> print HTML $content;
> close(HTML);
> print "file \"$file\" created\n\n";
> } else {
> print "unable to create file \"$file\"";
> }
You have a logic error that is independant of the choice of
programming language.
If you are able to get the resource, but are unable to create
the file, your program will output:
file "blah/blah.index.html" created
If you are not able to get the resource, your program will output:
unable to create file "blah/blah.index.html"
You should always, yes *always*, check the return value from open():
open(HTML, ">$file") or die "could not open '$file' $!";
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
|
|
0
|
|
|
|
Reply
|
Tad
|
2/2/2008 2:09:13 AM
|
|
On Feb 1, 9:09=A0pm, Tad J McClellan <ta...@seesig.invalid> wrote:
> Phil Powell <phillip.s.pow...@gmail.com> wrote:
> > my $mech =3D WWW::Mechanize->new();
> > $mech->get('https://www.example.com');
> > my $content =3D $mech->content;
>
> > if ($content ne "") {
> > =A0open(HTML, ">$file");
> > =A0print HTML $content;
> > =A0close(HTML);
> > =A0print "file \"$file\" created\n\n";
> > } else {
> > =A0print "unable to create file \"$file\"";
> > }
>
> You have a logic error that is independant of the choice of
> programming language.
>
> If you are able to get the resource, but are unable to create
> the file, your program will output:
>
> =A0 =A0file "blah/blah.index.html" created
>
> If you are not able to get the resource, your program will output:
>
> =A0 =A0unable to create file "blah/blah.index.html"
>
> You should always, yes *always*, check the return value from open():
>
> =A0 =A0 open(HTML, ">$file") or die "could not open '$file' $!";
I haven't coded in Perl in several years so I'll forget that step,
which isn't often done in my native language of PHP.
>
> --
> Tad McClellan
> email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
|
|
0
|
|
|
|
Reply
|
Phil
|
2/4/2008 1:57:07 PM
|
|
On 2008-02-04 13:57, Phil Powell <phillip.s.powell@gmail.com> wrote:
> On Feb 1, 9:09�pm, Tad J McClellan <ta...@seesig.invalid> wrote:
>> You should always, yes *always*, check the return value from open():
>>
>> � � open(HTML, ">$file") or die "could not open '$file' $!";
>
> I haven't coded in Perl in several years so I'll forget that step,
> which isn't often done in my native language of PHP.
Does PHP open throw an exception on error? If not you should get into
the habit of explicitely checking for errors in PHP, too.
(There is a perl module which causes the usual I/O functions to die() on
error, but I forgot its name)
hp
|
|
0
|
|
|
|
Reply
|
Peter
|
2/4/2008 5:15:44 PM
|
|
"Peter J. Holzer" <hjp-usenet2@hjp.at> writes:
> (There is a perl module which causes the usual I/O functions to die() on
> error, but I forgot its name)
use Fatal qw(open close);
//Makholm
|
|
0
|
|
|
|
Reply
|
Peter
|
2/4/2008 5:25:45 PM
|
|
On Mon, 04 Feb 2008 18:15:44 +0100, Peter J. Holzer wrote:
> On 2008-02-04 13:57, Phil Powell <phillip.s.powell@gmail.com> wrote:
>> On Feb 1, 9:09 pm, Tad J McClellan <ta...@seesig.invalid> wrote:
>>> You should always, yes *always*, check the return value from open():
>>>
>>> open(HTML, ">$file") or die "could not open '$file' $!";
>>
>> I haven't coded in Perl in several years so I'll forget that step,
>> which isn't often done in my native language of PHP.
>
> Does PHP open throw an exception on error? If not you should get into
> the habit of explicitely checking for errors in PHP, too.
No it doesn't. It does produce warnings though.
M4
|
|
0
|
|
|
|
Reply
|
Martijn
|
2/4/2008 7:36:31 PM
|
|
Quoth Peter Makholm <peter@makholm.net>:
> "Peter J. Holzer" <hjp-usenet2@hjp.at> writes:
>
> > (There is a perl module which causes the usual I/O functions to die() on
> > error, but I forgot its name)
>
> use Fatal qw(open close);
or use Fatal qw(:void open close); which only throws an exception if you
forgot to check yourself.
Ben
|
|
0
|
|
|
|
Reply
|
Ben
|
2/4/2008 7:54:36 PM
|
|
On Fri, 01 Feb 2008 22:11:35 +0100, Joost Diepenmaat <joost@zeekat.nl>
wrote:
>Phil Powell <phillip.s.powell@gmail.com> writes:
>
>>> Strawberry perl *should* provide all the means you need to install cpan
>>> tarballs. Download the thing from CPAN yourself and then do the usual
>>> stuff.
>>>
>>> http://www.cpan.org/modules/INSTALL.html
>>
>> Upon doing so, I am prompted (via the instructions to run Makefile.PL)
>> to provide the directory where the SSL Headers are located, using as
>> default "C:\openssl". Where would I find the appropriate SSL Headers
>> in order to accomplish this?
>>
>See:
>http://search.cpan.org/src/DLAND/Crypt-SSLeay-0.57/README
>
>Specifically:
>
> "You must have OpenSSL or SSLeay installed before compiling this module.
> You can get the latest OpenSSL package from:
>
> http://www.openssl.org"
>
>
>As a general note, installing XS modules (especially ones that require
>additional libraries) on strawberry perl is possible but not exactly
>painless. strawberry provides only just about the minimum of
>infrastructure to support this.
>
>Activeperl's ppm packages are a *lot* friendlier to use, and you should
>reconsider your judgement if the only reason you're using it is that the
>activestate site is blocked. Get your manager to fix that.
>
>Joost.
I have been using Activeperl for some time, but just became aware of the
fact that their ppm's deliver v0.72 of WWW::Mechanize, and the CPAN
version is 1.34 ! I have a gazillion modules from Activeperl. I've
been getting wierd results and would like to upgrade. Can I have
Strawberry and Activeperl on the same (Windows) machine?
|
|
0
|
|
|
|
Reply
|
dummy
|
2/22/2008 8:05:05 AM
|
|
dummy@phony.info writes:
> Can I have Strawberry and Activeperl on the same (Windows) machine?
Yes you can. As long as you're not forcing them to share compiled
directories.
--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
|
|
0
|
|
|
|
Reply
|
Joost
|
2/22/2008 9:03:37 AM
|
|
|
26 Replies
33 Views
(page loaded in 0.22 seconds)
|