niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Programming » Perl » modules
libcurl on Windows boxes ?
Post new topic   Reply to topic Page 2 of 2 [22 Posts] View previous topic :: View next topic
Goto page:  Previous  1, 2
Author Message
harryfmudd [AT] comcast [
*nix forums addict


Joined: 15 Oct 2005
Posts: 82

PostPosted: Sat Jul 08, 2006 1:55 pm    Post subject: Re: libcurl on Windows boxes ? Reply with quote

Sisyphus wrote:
Quote:
"harryfmudd [AT] comcast [DOT] net" <"harryfmudd [AT] comcast [DOT] net"
wrote in message
.
.

2) I can not (after all of a few minutes' work) find a good way to tell
whether the file system is case-preserving (but not case-sensitive).



Does the case-preserving question need to be considered ? I would have
thought that the *only* issue is whether the file system is case-sensitive
or not.

What I meant (but I guess didn't say) was 'case-preserving but not
case-sensitive'.

Quote:

Incidentally .... are there any file systems that are *not* case-preserving
?


VMS ODS-1 and ODS-2 are all-uppercase. ODS-5 is case-preserving but not
case-sensitive.

Tom Wyant
Back to top
Sisyphus
*nix forums Guru


Joined: 04 Mar 2005
Posts: 503

PostPosted: Sun Jul 09, 2006 12:00 am    Post subject: Re: libcurl on Windows boxes ? Reply with quote

"harryfmudd [AT] comcast [DOT] net" <"harryfmudd [AT] comcast [DOT] net">
wrote in message news:RJKdnU_Sh8zcJDLZnZ2dnUVZ_t2dnZ2d@comcast.com...
Quote:
Sisyphus wrote:
"harryfmudd [AT] comcast [DOT] net" <"harryfmudd [AT] comcast [DOT]
net"
wrote in message
.
.

2) I can not (after all of a few minutes' work) find a good way to tell
whether the file system is case-preserving (but not case-sensitive).



Does the case-preserving question need to be considered ? I would have
thought that the *only* issue is whether the file system is
case-sensitive
or not.

What I meant (but I guess didn't say) was 'case-preserving but not
case-sensitive'.


I was thinking that if you had a module that needed to know if the OS was
case-sensitive or not, when building that module you would simply have the
Makefile.PL do a '-e mAKefiLe.pL' ..... 'true' would mean the file system is
case-insensitive, 'false' would indicate a case-sensitive system. And that's
all you would have to do isn't it ?

Of course that test doesn't cater for the possibility that, on a
case-sensitive system, someone has created a 'mAKefiLe.pL' in the same
directory :-)

Cheers,
Rob
Back to top
harryfmudd [AT] comcast [
*nix forums addict


Joined: 15 Oct 2005
Posts: 82

PostPosted: Sun Jul 09, 2006 12:53 pm    Post subject: Re: libcurl on Windows boxes ? Reply with quote

Sisyphus wrote:
Quote:
"harryfmudd [AT] comcast [DOT] net" <"harryfmudd [AT] comcast [DOT] net"
wrote in message news:RJKdnU_Sh8zcJDLZnZ2dnUVZ_t2dnZ2d@comcast.com...

Sisyphus wrote:

"harryfmudd [AT] comcast [DOT] net" <"harryfmudd [AT] comcast [DOT]

net"

wrote in message
.
.


2) I can not (after all of a few minutes' work) find a good way to tell
whether the file system is case-preserving (but not case-sensitive).



Does the case-preserving question need to be considered ? I would have
thought that the *only* issue is whether the file system is

case-sensitive

or not.

What I meant (but I guess didn't say) was 'case-preserving but not
case-sensitive'.



I was thinking that if you had a module that needed to know if the OS was
case-sensitive or not, when building that module you would simply have the
Makefile.PL do a '-e mAKefiLe.pL' ..... 'true' would mean the file system is
case-insensitive, 'false' would indicate a case-sensitive system. And that's
all you would have to do isn't it ?

Of course that test doesn't cater for the possibility that, on a
case-sensitive system, someone has created a 'mAKefiLe.pL' in the same
directory :-)

Cheers,
Rob



Well, the other problem (or at least inconvenience) is that
case-sensitivity is a property of the filesystem, not the OS. You would
have to probe every time you wanted to know.

Tom Wyant
Back to top
Sherm Pendley
*nix forums Guru


Joined: 03 Mar 2005
Posts: 527

PostPosted: Sun Jul 09, 2006 4:44 pm    Post subject: Re: libcurl on Windows boxes ? Reply with quote

"Sisyphus" <sisyphus1@nomail.afraid.org> writes:

Quote:
I was thinking that if you had a module that needed to know if the OS was
case-sensitive or not, when building that module you would simply have the
Makefile.PL do a '-e mAKefiLe.pL' ..... 'true' would mean the file system is
case-insensitive, 'false' would indicate a case-sensitive system. And that's
all you would have to do isn't it ?

That will tell you whether the build directory is on a case-sensitive file
system, but that doesn't mean the install directory is also on such a file
system.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Back to top
Sisyphus
*nix forums Guru


Joined: 04 Mar 2005
Posts: 503

PostPosted: Mon Jul 10, 2006 7:19 am    Post subject: Re: libcurl on Windows boxes ? Reply with quote

"harryfmudd [AT] comcast [DOT] net"
..
..
Quote:

Well, the other problem (or at least inconvenience) is that
case-sensitivity is a property of the filesystem, not the OS. You would
have to probe every time you wanted to know.

Tom Wyant

That will tell you whether the build directory is on a case-sensitive file
system, but that doesn't mean the install directory is also on such a file
system.

sherm--

Tom, Sherm,

Yes ... that's what I was overlooking :-)

Cheers,
Rob
Back to top
Jean-Louis MOREL
*nix forums beginner


Joined: 08 May 2005
Posts: 5

PostPosted: Wed Jul 12, 2006 12:17 pm    Post subject: Re: libcurl on Windows boxes ? Reply with quote

Dans l'article <sY2dnXpvQfSfQzPZnZ2dnUVZ_tWdnZ2d@comcast.com>, "harryfmudd
[AT]comcast[DOT]net" a dit...
Quote:

harryfmudd [AT] comcast [DOT] net wrote:
[couic]

Follow-up: the devil is indeed in the details. Two issues turned up
after a little thought and fiddling:

1) It does not appear that you can override "use" by simply exporting
"use" from a package and having that call CORE::use.

2) I can not (after all of a few minutes' work) find a good way to tell
whether the file system is case-preserving (but not case-sensitive). The
OS name is not good enough, because many OSes support more than one kind
of file system. I suspect most Mac OS X users are using HFS+, which is
case-preserving. But if you happened to build it on top of the Unix file
system, it is case-sensitive. VMS is either case-sensitive or not
depending on whether your disk is ODS-1, ODS-2, or ODS-5 (and don't ask
me what happened to 3 and 4). I suspect Unix is not case-sensitive if
you happen to be loading modules from a SAMBA disk.

Nothing like making a public statement to find out you're wrong.



After some fruitless tentatives to override the functions 'require' and
'use', I got a solution: inserting code in @INC.
It's not the ideal solution, but it works on Win32 and Cygwin.

Can you test it on a Mac?
Thanks in advance.

Here is the code of strictModuleNames.pm (a better name?):

#!/usr/bin/perl
use strict;
use warnings;
use File::Spec;

package strictModuleNames;

my @myinc = @INC;
unshift @INC, \&check;

sub check {
my ( $coderef, $filename ) = @_;
my ( $FSpath, $path ) = FSpath($filename);
die "Case-sensitive mismatch between filenames:\n$FSpath\n$path\n"
if ( defined $FSpath and ( $FSpath ne $path ) );
return $FSpath;
}

sub FSpath {
my $filename = shift;

foreach (@myinc) {
my $FSpath = $_;
my $path;
if ( -e ( $path = $filename )
or -e ( $path = File::Spec->catfile( $FSpath, $filename ) ) )
{
my ( $volume, $directories, $file ) = File::Spec->splitpath($filename);
my @dirs = File::Spec->splitdir($directories);
my $found = 1;

foreach my $seg (@dirs) {
next unless $seg;
opendir DIR, $FSpath or die $!;
$found = 0;
while ( my $FSseg = readdir(DIR) ) {
if ( uc($FSseg) eq uc($seg) ) {
$FSpath = File::Spec->catdir( $FSpath, $FSseg );
$found = 1;
last;
}
}
closedir DIR;
}
next unless $found;

$found = 0;
opendir DIR, $FSpath or die $!;
while ( my $FSseg = readdir(DIR) ) {
if ( uc($FSseg) eq uc($file) ) {
$FSpath = File::Spec->catfile( $FSpath, $FSseg );
$found = 1;
last;
}
}
closedir DIR;
return ( $path, $FSpath ) if $found;
}
}
return;
}

1;
__END__


--
J-L.M.
http://www.bribes.org/perl
Back to top
Sherm Pendley
*nix forums Guru


Joined: 03 Mar 2005
Posts: 527

PostPosted: Wed Jul 12, 2006 1:25 pm    Post subject: Re: libcurl on Windows boxes ? Reply with quote

jl_morel@bribes.org (Jean-Louis MOREL) writes:

Quote:
After some fruitless tentatives to override the functions 'require' and
'use', I got a solution: inserting code in @INC.
It's not the ideal solution, but it works on Win32 and Cygwin.

Actually, it seems pretty good to me. I use the same approach in CamelBones,
to allow things like 'use WebKit' to load and wrap Cocoa frameworks.

I don't know whose idea it was to allow code refs in @INC, but it was sheer
brilliance, IMHO. :-)

Quote:
Can you test it on a Mac?

Works for me, on 10.4.7 "Tiger":

Sherm-Pendleys-Computer:~ sherm$ perl -MstrictModuleNames -MTExT::tEmPlAtE \
-e 'print "Howdy!\n"'
Case-sensitive mismatch between filenames:
/Library/Perl/5.8.6/TExT/tEmPlAtE.pm
/Library/Perl/5.8.6/Text/Template.pm
BEGIN failed--compilation aborted.

sherm--

--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 2 of 2 [22 Posts] Goto page:  Previous  1, 2
View previous topic :: View next topic
The time now is Sun Nov 23, 2008 11:36 am | All times are GMT
navigation Forum index » Programming » Perl » modules
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts problem with windows installer Christian Rengstl PostgreSQL 0 Fri Jul 21, 2006 10:55 am
No new posts Problem with Win32-SerialPort over bluetooth @ windows + ... ctloh Perl 0 Fri Jul 21, 2006 8:08 am
No new posts Capturing user login Information of windows sachin PHP 3 Fri Jul 21, 2006 5:44 am
No new posts AIX-Windows Rainer Rösch AIX 1 Thu Jul 20, 2006 8:38 am
No new posts WINDOWS ONLY Platform Solaris downloads Ian Solaris 2 Wed Jul 19, 2006 10:20 pm

Bay Area Web Design | Free Ringtones | Loans | Free Ringtones | MPAA
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.7133s ][ Queries: 16 (0.6075s) ][ GZIP on - Debug on ]