Skip Menu |

This queue is for tickets about the DBD-Sybase CPAN distribution.

Report information
The Basics
Id: 85870
Status: open
Priority: 0/
Queue: DBD-Sybase

People
Owner: Nobody in particular
Requestors: djacopille [...] mfs.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: DBD::Sybase 1.15 OS X bug and resolution
Date: Wed, 5 Jun 2013 01:28:55 +0000
To: "bug-DBD-Sybase [...] rt.cpan.org" <bug-DBD-Sybase [...] rt.cpan.org>
From: "Jacopille, David" <DJacopille [...] MFS.com>
DBD::Sybase 1.15 Makefile.PL run on OS X environment gives error: Can't find any Sybase libraries in /usr/local/freetds/lib or /usr/local/freetds/lib64 at Makefile.PL line 156, <IN> line 44. Makefile.PL lines 144-146: my @libdir = ( 'lib', 'lib64' ); print "$^O\n"; if ($^O =~ /win/i) { @libdir = ( 'dll' ); } Regex on second line 145 (second line in snippet) looks for 'win' in operating system type variable $^O. Intent is to switch to 'dll' directory on windows systems. Inadvertently switches to 'dll' on 'darwin' systems. $^O eq 'darwin' on OS X. Two recommendations: 1. Avoid switching to 'dll' directory on OS X systems using negative look behind to ensure 'win' is not preceded by 'dar'. 2. Avoid generic error message on die that conveys libraries are missing from 'lib' or 'lib64' when directory checked was 'dll'. Updated code in red: my @libdir = ( 'lib', 'lib64' ); if ($^O =~ /(?<!dar)win/i) { # added negative look behind to preclude switching to dll on 'darwin' systems. @libdir = ( 'dll' ); } my $checkeddirs; # declares variable to hold directories actually checked foreach $libdir ( @libdir ) { $checkeddirs .= "$SYBASE/$libdir "; # compiles the list of directories actually checked if ( -d "$SYBASE/$libdir" ) { if ( checkLib($SYBASE) ) { $libfound = 1; $libsub = $libdir; } } } die "Can't find any Sybase libraries in: $checkeddirs" # correctly states what library folders were checked unless $libfound; David Jacopille MFS Mail Relay Service made the following annotation on 06/04/13, 21:25:02 --------------------------------------------------------------------------------------------------------------------------------------- This email communication and any attachments may contain proprietary, confidential, or privileged information. If you are not the intended recipient, you are hereby notified that you have received this email in error and that any review, disclosure, dissemination, distribution or copying of it or its contents is prohibited. The sender does not waive confidentiality or any privilege by mistransmission. If you have received this email in error, please notify the sender immediately, delete this email, and destroy all copies and any attachments. ==============================================================================
This is also a bug on debian. Freetds-lib does not install to a ./lib or ./lib64 so $libdir gets in the way. -- Evan Carroll System Lord of the Internets http://www.evancarroll.com