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
Install Picks Wrong Dir for Include Files
Post new topic   Reply to topic Page 1 of 6 [76 Posts] View previous topic :: View next topic
Goto page:  1, 2, 3, 4, 5, 6 Next
Author Message
server
*nix forums addict


Joined: 19 Feb 2005
Posts: 60

PostPosted: Mon Feb 21, 2005 12:51 pm    Post subject: Install Picks Wrong Dir for Include Files Reply with quote

message unavailable
Back to top
Jonathan Stowe
*nix forums beginner


Joined: 03 Mar 2005
Posts: 5

PostPosted: Mon Feb 21, 2005 12:51 pm    Post subject: Re: XML::XSLT not recognizing attributes Reply with quote

lars@nospam.nosoftwarepatents.edu wrote:
Quote:
The module XML::XSLT seems not to recognize attributes.

According to what I read about patterns[1], this bit of XSLT should set
the string "FUBAR" before each and every h3 element where the attribute
class contains the value "subtitle":

xsl:template match='h3[@class="subtitle"]'>FUBAR
xsl:apply-templates/
/xsl:template


If you mail me and/or the xmlxslt-discuss@lists.sourceforge.net list
with some example XML, the stylesheet and the expected output we can
make a test for this with a view to getting it implemented properly.

/J\
Back to top
Sherm Pendley
*nix forums Guru


Joined: 03 Mar 2005
Posts: 527

PostPosted: Mon Feb 21, 2005 12:51 pm    Post subject: Re: Install Picks Wrong Dir for Include Files Reply with quote

Michael Gillis wrote:

Quote:
I am trying to install DBD::mysql

perl -MCPAN -e 'install DBD::mysql'

Compiling dbdimp.c dies because it can't resolve the header files mysql.h
and errmsg.h. Under the setup it states it will use

cflags (mysql_config) = -I/usr/local/mysql/include/mysql

.... snip ...

Quote:
Is there any way I can override what it thinks it should be using?

Yes - the options for doing so are listed in the installation instructions
that come with the module. Have a look at the INSTALL.html file.

sherm--

--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
Back to top
Otto J. Makela
*nix forums beginner


Joined: 21 Feb 2005
Posts: 8

PostPosted: Mon Feb 21, 2005 12:51 pm    Post subject: Re: Sys::Syslog problems Reply with quote

om@iki.fi (Otto J. Makela) wrote:

Quote:
Unfortunately, on further testing, seems Unix::Syslog fails rather
mysteriously with "bad file number" and the message being lost:

% cat logtest.pl
#!/usr/bin/perl -w

use strict;
use Unix::Syslog qw(:macros);

$0 =~ s,^.*\/,,o;

sub LOG {
use Unix::Syslog qw(:subs);
openlog($0,LOG_PID|LOG_NDELAY,LOG_MAIL);
syslog(LOG_INFO,@_) || die "error in syslog: $!\n";
closelog();
}

LOG("mail informational message");

My two goofs:

1) syslog(3c) does not have a return value

2) the perl/c interface does not allow one to omit arguments and expect
them to be obtainable from @_, they need to be given explicitly

Thus, the following code snippet works just fine, and without delays:

sub LOG {
use Unix::Syslog qw(:subs);
my $format=shift;
openlog($0,LOG_PID|LOG_NDELAY,LOG_MAIL);
syslog(LOG_INFO,$format,@_);
closelog();
}
--
/* * * Otto J. Makela <om@iki.fi> * * * * * * * * * * * * * * * */
/* Phone: +358 40 765 5772, FAX: +358 42 7655772, ICBM: 60N 25E */
/* Mail: Mechelininkatu 26 B 27, FIN-00100 Helsinki, FINLAND */
/* * * Computers Rule 01001111 01001011 * * * * * * * * * * * * */
Back to top
Sisyphus
*nix forums Guru


Joined: 04 Mar 2005
Posts: 503

PostPosted: Mon Feb 21, 2005 12:51 pm    Post subject: Re: Archive::Zip Reply with quote

jay wrote:
Quote:
I've been banging my head with Archive::Zip for a while. Usually I
have no problem with modules but nothing seems to work with this one.
I've read through
http://search.cpan.org/~nedkonz/Archive-Zip-1.14/lib/Archive/Zip.pod
but still, no luck at all.

I guess I'll just spell out what I need to do and maybe someone can
tell me if this is the right tool or not.

I have a folder on a windows machine that contains several very large
zip files. All I need to do is get into the folder (easy), and somehow
gain access to every member in each of the zip files. I'll be using
some Image::Info to read the header information from each file (they
are all images) which is the end-reason why I need this to work. I can
handle Image::Info, its very easy. But getting accesss to the memebers
of the zip file....

I can't get Archive::Zip to work on One file: I can't seem to digest
the syntax of the module at all.

use Archive::Zip;
use Archive::Zip::MemberRead;

chdir "C:\\UTD_PC\\pictures";
$zip = new Archive::Zip("CHTN_Pix.zip"); # what happens here?
$fh = new Archive::Zip::MemberRead($zip, "aht_dr2.bmp"); # what
happens here?
while (defined($line = $fh->getline())){
print "$fh->input_line_number\n";
}

I'll try to find some examples of successful uses of the module and
report back.

Thanks to anyone that can help : )

jsplaine@uptodate.com


Untested:

use warnings;
use Archive::Zip qw(:ERROR_CODES);

# Create a new Archive::Zip object
my $zip = Archive::Zip->new();
my $zipfile = "C:\\UTD_PC\\pictures\\CHTN_Pix.zip";

# Read the zip file into $zip
unless($zip->read($zipfile) == AZ_OK) {
die "Read error";
}

# Extract a copy of the file you want
# to the current working directory
$zip->extractMemberWithoutPaths('aht_dr2.bmp');

# Use Image::Info to process the file.

# If you don't want to keep the local copy of the file:
unless(unlink('aht_dr2.bmp')) {
warn "Failed to delete the local copy\n";
}

__END__

Cheers,
Rob

--
To reply by email u have to take out the u in kalinaubears.
Back to top
jay
*nix forums beginner


Joined: 15 Mar 2005
Posts: 29

PostPosted: Mon Feb 21, 2005 12:51 pm    Post subject: Re: Archive::Zip Reply with quote

I've been banging my head with Archive::Zip for a while. Usually I
have no problem with modules but nothing seems to work with this one.
I've read through
http://search.cpan.org/~nedkonz/Archive-Zip-1.14/lib/Archive/Zip.pod
but still, no luck at all.

I guess I'll just spell out what I need to do and maybe someone can
tell me if this is the right tool or not.

I have a folder on a windows machine that contains several very large
zip files. All I need to do is get into the folder (easy), and somehow
gain access to every member in each of the zip files. I'll be using
some Image::Info to read the header information from each file (they
are all images) which is the end-reason why I need this to work. I can
handle Image::Info, its very easy. But getting accesss to the memebers
of the zip file....

I can't get Archive::Zip to work on One file: I can't seem to digest
the syntax of the module at all.

use Archive::Zip;
use Archive::Zip::MemberRead;

chdir "C:\\UTD_PC\\pictures";
$zip = new Archive::Zip("CHTN_Pix.zip"); # what happens here?
$fh = new Archive::Zip::MemberRead($zip, "aht_dr2.bmp"); # what
happens here?
while (defined($line = $fh->getline())){
print "$fh->input_line_number\n";
}

I'll try to find some examples of successful uses of the module and
report back.

Thanks to anyone that can help : )

jsplaine@uptodate.com
Back to top
Otto J. Makela
*nix forums beginner


Joined: 21 Feb 2005
Posts: 8

PostPosted: Mon Feb 21, 2005 12:51 pm    Post subject: Re: Sys::Syslog problems Reply with quote

"Karen Wieprecht" <karen.wieprecht@jhuapl.edu> wrote:

Quote:
Tried installing it, but unfortunately initially got version 0.99.

Installing M/MH/MHARNISCH/Unix-Syslog-0.100.tar.gz got me version
0.100 and everything is fine now.

I believe I got version 0.100 (I'll have to double check). When you
had version 0.99, what was the problem?

1. Was it simply not working? Or

2. Was stuff going into the system log, but with "delays" ?

With the newer version, I assume stuff is coming into the system log
now, but are you getting delays or is it coming in pretty steadily?

Version 0.99 did not properly build on Solaris 5.8, but I discovered
that the author had changed and installed the latest version by
specifying the proper version directly, as described above.

Unfortunately, on further testing, seems Unix::Syslog fails rather
mysteriously with "bad file number" and the message being lost:

% cat logtest.pl
#!/usr/bin/perl -w

use strict;
use Unix::Syslog qw(:macros);

$0 =~ s,^.*\/,,o;

sub LOG {
# use Sys::Syslog;
# openlog($0,'pid','mail');
# syslog('info',@_) || die "error in syslog: $!\n";

use Unix::Syslog qw(:subs);
openlog($0,LOG_PID|LOG_NDELAY,LOG_MAIL);
syslog(LOG_INFO,@_) || die "error in syslog: $!\n";
closelog();
}

LOG("mail informational message");

% ./logtest.pl
error in syslog: Bad file number

% tail -1 /var/log/maillog
Feb 4 23:04:30 green logtest.pl[25517]: [ID 702911 mail.info] 1

--
/* * * Otto J. Makela <om@iki.fi> * * * * * * * * * * * * * * * */
/* Phone: +358 40 765 5772, FAX: +358 42 7655772, ICBM: 60N 25E */
/* Mail: Mechelininkatu 26 B 27, FIN-00100 Helsinki, FINLAND */
/* * * Computers Rule 01001111 01001011 * * * * * * * * * * * * */
Back to top
Ilya Zakharevich
*nix forums Guru Wannabe


Joined: 25 Feb 2005
Posts: 219

PostPosted: Mon Feb 21, 2005 12:51 pm    Post subject: Re: URI::URL query vs equery Reply with quote

[A complimentary Cc of this posting was sent to
Gisle Aas
<gisle@activestate.com>], who wrote in article <87lla5sv1p.fsf@ask.g.aas.no>:
Quote:
http://groups-beta.google.com/group/comp.lang.perl/browse_threa
d/thread/3ee08b1ef5ae3c12/30a234783d298f2e?q=beg%2Fyour+%22loca
l($_)+works%22+group:*.perl.*+author:Larry+author:Wall&_done=%2
Fgroups%3Fas_q%3Dbeg%2Fyour%26as_epq%3Dlocal($_)+works%26as_oq%
3D%26as_eq%3D%26btnG%3DGoogle+Search+News%26as_ugroup%3D*.perl.
*%26as_usubject%3D%26as_uauthors%3DLarry+Wall%26as_umsgid%3D%26
lr%3D%26as_drrb%3Dq%26as_qdr%3D%26as_mind%3D29%26as_minm%3D3%26
as_miny%3D1981%26as_maxd%3D26%26as_maxm%3D10%26as_maxy%3D2005%2
6num%3D50%26as_scoring%3Dr%26&_doneTitle=Back+to+Search&&d#30a2
34783d298f2e

The error message is

Form query contains escaped '=' or '&' (you must call equery)

That would be good. But is the error message backward-compatible???

Not really sure. I hope so.

The old query() is gone because I strongly believe it was a bad interface.
Then you could use:

uri_unescape($u->equery);

Can you please be more specific? This is is what $u->query() does if
it would not die() in the check above... Was there any reason for the
check, or was it just a pilot error? Apparently, google has no
problem with URL above...

(query_form() returns pairs; I'm not interested in pairs...)

Thanks,
Ilya

P.S. During last two years I sent some email to you, and do not
remember seeing answers. I know some bugs/problems in LWP, is
it possible to report them without subscribing to yet more
mailing lists? E.g., is the news server mirror back-propagated
into the mailing list?
Back to top
Gisle Aas
*nix forums beginner


Joined: 09 Apr 2005
Posts: 2

PostPosted: Mon Feb 21, 2005 12:51 pm    Post subject: Re: URI::URL query vs equery Reply with quote

Ilya Zakharevich <nospam-abuse@ilyaz.org> writes:

Quote:
gisle@activestate.com>], who wrote in article <87sm4g38m7.fsf@ask.g.aas.no>:
Ilya Zakharevich <nospam-abuse@ilyaz.org> writes:

I'm testing a module using URI::URL, and it refuses to call query() on
the URL created by google (lines should be merged...):

http://groups-beta.google.com/group/comp.lang.perl/browse_threa
d/thread/3ee08b1ef5ae3c12/30a234783d298f2e?q=beg%2Fyour+%22loca
l($_)+works%22+group:*.perl.*+author:Larry+author:Wall&_done=%2
Fgroups%3Fas_q%3Dbeg%2Fyour%26as_epq%3Dlocal($_)+works%26as_oq%
3D%26as_eq%3D%26btnG%3DGoogle+Search+News%26as_ugroup%3D*.perl.
*%26as_usubject%3D%26as_uauthors%3DLarry+Wall%26as_umsgid%3D%26
lr%3D%26as_drrb%3Dq%26as_qdr%3D%26as_mind%3D29%26as_minm%3D3%26
as_miny%3D1981%26as_maxd%3D26%26as_maxm%3D10%26as_maxy%3D2005%2
6num%3D50%26as_scoring%3Dr%26&_doneTitle=Back+to+Search&&d#30a2
34783d298f2e

The error message is

Form query contains escaped '=' or '&' (you must call equery)

Of course, equery() works; however, I would prefer to have the result
of query()... Can somebody explain the reason behind this madness?

Backwards compatiblity.

That would be good. But is the error message backward-compatible???

Not really sure. I hope so. I don't have any old versions of
URI::URL laying around so I can't easily check.

Quote:
How to avoid this?

Avoid URI::URL; use URI.pm instead.

How? AFAIU, it has no analogue of query()...

I would think that query_form() would be the right method for decoding
this URL. The old query() is gone because I strongly believe it was a
bad interface.

Quote:
P.S. I do not care if query() is lossy...

Then you could use:

uri_unescape($u->query);

or if you really want to stay with $u as a URI::URL reference:

uri_unescape($u->equery);

--
Gisle Aas
Back to top
Ilya Zakharevich
*nix forums Guru Wannabe


Joined: 25 Feb 2005
Posts: 219

PostPosted: Mon Feb 21, 2005 12:51 pm    Post subject: Re: URI::URL query vs equery Reply with quote

[A complimentary Cc of this posting was sent to
Gisle Aas
<gisle@activestate.com>], who wrote in article <87sm4g38m7.fsf@ask.g.aas.no>:
Quote:
Ilya Zakharevich <nospam-abuse@ilyaz.org> writes:

I'm testing a module using URI::URL, and it refuses to call query() on
the URL created by google (lines should be merged...):

http://groups-beta.google.com/group/comp.lang.perl/browse_threa
d/thread/3ee08b1ef5ae3c12/30a234783d298f2e?q=beg%2Fyour+%22loca
l($_)+works%22+group:*.perl.*+author:Larry+author:Wall&_done=%2
Fgroups%3Fas_q%3Dbeg%2Fyour%26as_epq%3Dlocal($_)+works%26as_oq%
3D%26as_eq%3D%26btnG%3DGoogle+Search+News%26as_ugroup%3D*.perl.
*%26as_usubject%3D%26as_uauthors%3DLarry+Wall%26as_umsgid%3D%26
lr%3D%26as_drrb%3Dq%26as_qdr%3D%26as_mind%3D29%26as_minm%3D3%26
as_miny%3D1981%26as_maxd%3D26%26as_maxm%3D10%26as_maxy%3D2005%2
6num%3D50%26as_scoring%3Dr%26&_doneTitle=Back+to+Search&&d#30a2
34783d298f2e

The error message is

Form query contains escaped '=' or '&' (you must call equery)

Of course, equery() works; however, I would prefer to have the result
of query()... Can somebody explain the reason behind this madness?

Backwards compatiblity.

That would be good. But is the error message backward-compatible???

Quote:
How to avoid this?

Avoid URI::URL; use URI.pm instead.

How? AFAIU, it has no analogue of query()...

Thanks,
Ilya

P.S. I do not care if query() is lossy...
Back to top
James Tolley
*nix forums beginner


Joined: 21 Feb 2005
Posts: 1

PostPosted: Mon Feb 21, 2005 12:51 pm    Post subject: Re: Entering pathnames in a CGI.pm field Reply with quote

"juliadream" <juliadream@psych.net> wrote in message
news:uejKd.9462$mA5.717064@news20.bellglobal.com...
Quote:
I am using CGI.pm and I have a CGI form where the user has to enter a
pathname (/dir/dir/file) in one of the fields.

Instead of typing the pathname, I would like the user to be able to use
the
mouse to pick a path from some kind of a file-browser (even if it is a
very
primitive one). Does anyone know how to do this and/or whether someone
has
already written a module to do that?

Since this is a client-side thing (that is, something running on the

client's machine), perl running on the server wouldn't be able to help much
here (unless you can configure your client machines to run ActiveState's
PerlScript, which is a big security no-no. I suggest that you try to find a
JavaScript class that does this.

hth
Back to top
Michael Gillis
*nix forums beginner


Joined: 21 Feb 2005
Posts: 1

PostPosted: Mon Feb 21, 2005 12:51 pm    Post subject: Re: Install Picks Wrong Dir for Include Files Reply with quote

Sherm Pendley wrote:

Quote:
Michael Gillis wrote:

I am trying to install DBD::mysql

perl -MCPAN -e 'install DBD::mysql'

Compiling dbdimp.c dies because it can't resolve the header files mysql.h
and errmsg.h. Under the setup it states it will use

cflags (mysql_config) = -I/usr/local/mysql/include/mysql

... snip ...

Is there any way I can override what it thinks it should be using?

Yes - the options for doing so are listed in the installation instructions
that come with the module. Have a look at the INSTALL.html file.

sherm--


Thanks sherm -
--
~~~~~~~~~
Remove GARBAGE from email address when replying
~~~~~~~~~
M Gillis
TPW-CITO
Nova Scotia
Canada
Back to top
Roy Stilling
*nix forums beginner


Joined: 01 Mar 2005
Posts: 1

PostPosted: Tue Mar 01, 2005 10:08 am    Post subject: Re: Getting "undefined sysmbol Reply with quote

"btna" <btna@terra.com> wrote in message news:<1107875562.331118.126360@c13g2000cwb.googlegroups.com>...

Quote:
lc Pari.o libPARI/libPARI.a -lm
ld: 0711-317 ERROR: Undefined symbol: .PERL_UNUSED_VAR
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
make: 1254-004 The error code from the last command is 8.

I had a similar error compiling this module on Red Hat. I found a
posting on the pari-dev mailing list archives on the PARI/GP site
which suggested adding the following lines to Pari.xs

#ifndef PERL_UNUSED_VAR
# define PERL_UNUSED_VAR(var) if (0) var = var
#endif

This fixed the problem for me. Good luck.

--
Roy Stilling
Senior Web Developer
________________________________________________________________________
http://www.akqa.com
AKQA, Princes House, 38 Jermyn Street, St James's, London, SW1Y 6DN,
UK.
Back to top
Brian McCauley
*nix forums Guru Wannabe


Joined: 21 Feb 2005
Posts: 277

PostPosted: Wed Mar 23, 2005 10:00 am    Post subject: Re: XML::LibXSLT element tags stripped out of transformation Reply with quote

Abro Gaticus wrote:

[ exactly the same thing he wrote in .misc ]

Please do not do that. If a thread belongs in two newsgroups then
cross-post it. Do not start two separate threads and potentially waste
people's time by having them respond in one thread with stuff that's
already mention in the other.

But since the definition of being on-topic in .misc is Perl realated
stuff that doesn't fit into one of the other clp groups it cannot
(except in a few very special cases) be appropriate to crosspost.
Back to top
Abro Gaticus
*nix forums beginner


Joined: 23 Mar 2005
Posts: 2

PostPosted: Wed Mar 23, 2005 2:46 pm    Post subject: Re: XML::LibXSLT element tags stripped out of transformation Reply with quote

My sincere apologies.

I was under the misconception that my post in clpm had failed and
decided this group might be a better fit on my second attempt. In the
future I will be more careful. Thanks!

-Abro
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 6 [76 Posts] Goto page:  1, 2, 3, 4, 5, 6 Next
View previous topic :: View next topic
The time now is Wed Jan 07, 2009 6:50 pm | All times are GMT
navigation Forum index » Programming » Perl » modules
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Install suse from USB without BIOS support vjy04 Suse 0 Tue Jun 24, 2008 8:57 am
No new posts Install suse from USB without BIOS support vjy04 Suse 0 Tue Jun 24, 2008 8:56 am
No new posts Install suse from USB without BIOS support vjy04 Suse 0 Tue Jun 24, 2008 8:56 am
No new posts Install suse from USB without BIOS support vjy04 Suse 0 Tue Jun 24, 2008 8:55 am
No new posts RS6000 43p/140 AIX 4.3 new install - am stuck! remllov99x AIX 0 Tue Aug 21, 2007 11:07 pm

T Shirt Quilts | Dutch Bodybuilding Forums | Loans | Credit Cards | Buy Anything On eBay
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.7125s ][ Queries: 16 (0.5688s) ][ GZIP on - Debug on ]