[25816] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 8053 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu May 5 18:05:36 2005

Date: Thu, 5 May 2005 15:05:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 5 May 2005     Volume: 10 Number: 8053

Today's topics:
    Re: Different POST encoding format <djb@global.net.mt>
        Help regarding Perl modules in .pl and .in extension. <djb@global.net.mt>
    Re: Help regarding Perl modules in .pl and .in extensio <noel.dolan@atlantisstorm.com>
    Re: Help regarding Perl modules in .pl and .in extensio <djb@global.net.mt>
    Re: Help regarding Perl modules in .pl and .in extensio <noel.dolan@atlantisstorm.com>
    Re: Help regarding Perl modules in .pl and .in extensio <glex_nospam@qwest.invalid>
    Re: Help regarding Perl modules in .pl and .in extensio (Anno Siegel)
    Re: How do I parse certain "bits" out of bytes? <pilkowsk@informatik.uni-marburg.de>
    Re: regular expression <pilkowsk@informatik.uni-marburg.de>
        sorting a structure <bg1343d@hotmail.com>
    Re: Using pod2html for all modules? <jsmith@nowhere.com>
    Re: Using pod2html for all modules? (Anno Siegel)
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Thu, 5 May 2005 18:17:03 +0200
From: "David Joseph Bonnici" <djb@global.net.mt>
Subject: Re: Different POST encoding format
Message-Id: <d5dgu2$3lv$1@domitilla.aioe.org>

Here is another guy having my same problem.
http://groups.google.com.mt/groups?q=%2520+instead+of+%2B+post+perl&hl=mt&lr=&selm=53a78a46.0109020051.4783cdb1%40posting.google.com&rnum=10 




------------------------------

Date: Thu, 5 May 2005 17:44:08 +0200
From: "David Joseph Bonnici" <djb@global.net.mt>
Subject: Help regarding Perl modules in .pl and .in extension.
Message-Id: <d5df08$tlm$1@domitilla.aioe.org>

Hi I am using ActivePerl (Build 811) on Windows. I am using Komodo as an 
editor.  I am a newbie.

I am having problems when referencing to modules that have the extension .pl 
or .in.
I am using downloaded projects from sourceforge to test some features.

I usually found myself in the scenario, and I get stuck.

in a test123.pl file I find

 .....
use David;
 .....

When I go to search for the modules, (in order to copy these files to 
c:\perl\lib) I find

David.pm.pl and David.pm.in.

If I copy them to the lib folder, the interpreter still tells me that he 
cannot find the module

If I try to remame anyone of them, I get cannot compile object.

Any help is appreciated.

David




------------------------------

Date: Thu, 05 May 2005 16:51:44 GMT
From: "Atlantis" <noel.dolan@atlantisstorm.com>
Subject: Re: Help regarding Perl modules in .pl and .in extension.
Message-Id: <Aasee.20822$5A3.19671@newsfe4-win.ntli.net>

I'm not familiar with Komodo, but I can say that if you've got a perl
statement...

use David;

 ... then perl will be looking for a file called David.pm, so I would guess
that you need to rename either the .pl or .in file as "David.pm".

Hope this helps.





------------------------------

Date: Thu, 5 May 2005 19:17:08 +0200
From: "David Joseph Bonnici" <djb@global.net.mt>
Subject: Re: Help regarding Perl modules in .pl and .in extension.
Message-Id: <d5dkf0$e56$1@domitilla.aioe.org>

However it seems to work fine on unix. I think that the pl is somewhat piped 
trough .in and this makes the module.  There must be a way to make the 
ineterpreter aware of this.

If I run the same code trough command line, I get the problems.

Thanks Noel

David

"Atlantis" <noel.dolan@atlantisstorm.com> wrote in message 
news:Aasee.20822$5A3.19671@newsfe4-win.ntli.net...
> I'm not familiar with Komodo, but I can say that if you've got a perl
> statement...
>
> use David;
>
> ... then perl will be looking for a file called David.pm, so I would guess
> that you need to rename either the .pl or .in file as "David.pm".
>
> Hope this helps.
>
>
> 




------------------------------

Date: Thu, 05 May 2005 17:41:58 GMT
From: "Atlantis" <noel.dolan@atlantisstorm.com>
Subject: Re: Help regarding Perl modules in .pl and .in extension.
Message-Id: <GVsee.20832$5A3.1378@newsfe4-win.ntli.net>

Could be worth trying...

use lib("path-to-files");
use David;



"David Joseph Bonnici" <djb@global.net.mt> wrote in message
news:d5dkf0$e56$1@domitilla.aioe.org...
> However it seems to work fine on unix. I think that the pl is somewhat
piped
> trough .in and this makes the module.  There must be a way to make the
> ineterpreter aware of this.
>
> If I run the same code trough command line, I get the problems.
>
> Thanks Noel
>
> David
>
> "Atlantis" <noel.dolan@atlantisstorm.com> wrote in message
> news:Aasee.20822$5A3.19671@newsfe4-win.ntli.net...
> > I'm not familiar with Komodo, but I can say that if you've got a perl
> > statement...
> >
> > use David;
> >
> > ... then perl will be looking for a file called David.pm, so I would
guess
> > that you need to rename either the .pl or .in file as "David.pm".
> >
> > Hope this helps.
> >
> >
> >
>
>




------------------------------

Date: Thu, 05 May 2005 13:28:16 -0500
From: "J. Gleixner" <glex_nospam@qwest.invalid>
Subject: Re: Help regarding Perl modules in .pl and .in extension.
Message-Id: <4Btee.23$nu.814@news.uswest.net>

David Joseph Bonnici wrote:
> Hi I am using ActivePerl (Build 811) on Windows. I am using Komodo as an 
> editor.  I am a newbie.
> 
> I am having problems when referencing to modules that have the extension .pl 
> or .in.
> I am using downloaded projects from sourceforge to test some features.
> 
> I usually found myself in the scenario, and I get stuck.
> 
> in a test123.pl file I find
> 
> .....
> use David;
> .....
> 
> When I go to search for the modules, (in order to copy these files to 
> c:\perl\lib) I find

This isn't how you install modules.

> 
> David.pm.pl and David.pm.in.
> 
> If I copy them to the lib folder, the interpreter still tells me that he 
> cannot find the module
> 
> If I try to remame anyone of them, I get cannot compile object.
> 
> Any help is appreciated.
> 
> David
> 
> 

Maybe, if you provided a real example, something from sourceforge, it 
might help.


------------------------------

Date: 5 May 2005 21:07:35 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Help regarding Perl modules in .pl and .in extension.
Message-Id: <d5e1un$i1b$1@mamenchi.zrz.TU-Berlin.DE>

David Joseph Bonnici <djb@global.net.mt> wrote in comp.lang.perl.misc:
> Hi I am using ActivePerl (Build 811) on Windows. I am using Komodo as an 
> editor.  I am a newbie.
> 
> I am having problems when referencing to modules that have the extension .pl 
> or .in.
> I am using downloaded projects from sourceforge to test some features.
> 
> I usually found myself in the scenario, and I get stuck.
> 
> in a test123.pl file I find
> 
> .....
> use David;
> .....
> 
> When I go to search for the modules, (in order to copy these files to 
> c:\perl\lib) I find
> 
> David.pm.pl and David.pm.in.
> 
> If I copy them to the lib folder, the interpreter still tells me that he 
> cannot find the module
> 
> If I try to remame anyone of them, I get cannot compile object.
> 
> Any help is appreciated.

You haven't installed the module properly.  David.pm.pl and David.pm.in
(why didn't you give a real example?) are a Perl script and a template
file that together create David.pm.  This happens during what is called
the build process.  I don't know the particulars of the build process
under windows, but it would include thinks like

    perl Makefile.PL
    nmake

etc.

If the module you want doesn't come pre-packaged for windows, it may
be hard to install.

Anno


------------------------------

Date: Thu, 5 May 2005 20:53:06 +0200
From: Fabian Pilkowski <pilkowsk@informatik.uni-marburg.de>
Subject: Re: How do I parse certain "bits" out of bytes?
Message-Id: <3dv8b3Fck6aU1@individual.net>

* Mike Heins schrieb:
> 
> Here is a way that doesn't rely on the somewhat impenetrable
> unpack() function:
> 
> 	my $value = 0x65;
> 	my $binstring = sprintf '%b', $value;
> 	$binstring = '0' . $binstring while length($binstring) < 8;

Sure, anyone could understand what you're doing here but it's more
elegant to insert "08" into the format string

        my $binstring = sprintf '%08b', $value;
        
instead of a while loop.

regards,
fabian


------------------------------

Date: Thu, 5 May 2005 21:01:16 +0200
From: Fabian Pilkowski <pilkowsk@informatik.uni-marburg.de>
Subject: Re: regular expression
Message-Id: <3dv8qbFclhkU1@individual.net>

* kums schrieb:
> 
> Thanks. it is working
> can u explain the following line .
> 
> 1 while s/^([-+]?\d+)(\d{2})/$1,$2/;

Well, the regex itself is explained in my last posting in this thread,
isn't it? And the while loop just means "substitute as long as there's
something to substitute".

I don't know which part you don't understand. Have you already read
`perldoc perlop` to learn what s/// is returning each time? ;-)

regards,
fabian


------------------------------

Date: Thu, 5 May 2005 14:22:55 -0700
From: "Brett" <bg1343d@hotmail.com>
Subject: sorting a structure
Message-Id: <UJ6dnfbjdc0tE-ffRVn-2Q@adelphia.com>

"Jürgen Exner" <jurgenex@hotmail.com> wrote in message
news:8Tmee.2706$Vu.1954@trnddc07...
> Brett wrote:
> > I have two arrays and i wish to sort the first one numerically, but
> > after sorting, I would like the second array to be in the same
> > matching order as the first array.
> >
> > ie.
> >
> > @l1={3,1,2};
> > @l2={'a','b','c'};
> >
> > @l1 = sort {$a <=> $b} (@l1);    # sort list @l1 to be {1,2,3}
> >
> > # do something to @l2 to make order {'b','c','a'} (preserving the
> > original mapping with the first list)
> >
> > There's probably an easy way to do this that i'm not aware of.
>
> Indeed, there is: use a data structure that matches your problem better.
> Instead of having a pair of unrelated arrays use a single array of pairs.
> And then sort that single array by the value of the first component of
each
> pair.
>
> jue


I'm new to this, and tried to give it a go.

use Class::Struct;

struct ID =>
{
 number => '$',
 name => '$',
};

my @IDs = ID->new();
#fill data...

@IDs = sort {$a->number <=> $b->number} (@IDs);  # numeric sort on number

but that failed to sort the list as i expected. How can i use sort on a
structure to do
what I want?





------------------------------

Date: Thu, 5 May 2005 20:46:25 +0000 (UTC)
From: John Smith <jsmith@nowhere.com>
Subject: Re: Using pod2html for all modules?
Message-Id: <Xns964D8C1D59738jsmithnowherecom@132.239.1.221>

Sorry, what I meant was, is there a simple way to call pod2html on a 
directory so that it recurses through all subdirectories finding perl 
modules, producing html for them, and cross-referncing them including 
inheritance classes?

Thanks.

anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote in
news:d5cpqa$pvi$1@mamenchi.zrz.TU-Berlin.DE: 

> John Smith  <jsmith@nowhere.com> wrote in comp.lang.perl.misc:
>> Hi,
>> 
>> Does anyone know of a simple way (maybe with pod2html?) to generate
>> cross- regferenced HTML pages for all the perl modules on my machine?
> 
> Apply pod2html to all of them.  There won't be more cross-references
> than the pod authors put into them, probably not very many.
> 
> Anno
> 



------------------------------

Date: 5 May 2005 21:16:10 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Using pod2html for all modules?
Message-Id: <d5e2eq$i1b$2@mamenchi.zrz.TU-Berlin.DE>

John Smith  <jsmith@nowhere.com> wrote in comp.lang.perl.misc:

Don't top-post.  I have put your reply in context.

> anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote in
> news:d5cpqa$pvi$1@mamenchi.zrz.TU-Berlin.DE: 
> 
> > John Smith  <jsmith@nowhere.com> wrote in comp.lang.perl.misc:
> >> Hi,
> >> 
> >> Does anyone know of a simple way (maybe with pod2html?) to generate
> >> cross- regferenced HTML pages for all the perl modules on my machine?
> > 
> > Apply pod2html to all of them.  There won't be more cross-references
> > than the pod authors put into them, probably not very many.

> Sorry, what I meant was, is there a simple way to call pod2html on a 
> directory so that it recurses through all subdirectories finding perl 
> modules, producing html for them, and cross-referncing them including 
> inheritance classes?

Have you bothered to take a look at the documentation of pod2html?
There seem to be plenty of options that allow to go through directories
in search for pod files (recursively if you want), and also to direct
generation of cross-references.  Read about them, run a few experiments,
you'll get there.

Anno


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 8053
***************************************


home help back first fref pref prev next nref lref last post