[18778] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 946 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 21 03:06:12 2001

Date: Mon, 21 May 2001 00:05:13 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <990428713-v10-i946@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Mon, 21 May 2001     Volume: 10 Number: 946

Today's topics:
    Re: Are compiled regexes global? <joe+usenet@sunstarsys.com>
    Re: Are compiled regexes global? <sherlock@genome.stanford.edu>
    Re: Are compiled regexes global? <tinamue@zedat.fu-berlin.de>
    Re: Are compiled regexes global? <joe+usenet@sunstarsys.com>
    Re: Are compiled regexes global? <aqumsieh@hyperchip.com>
    Re: Can anyone help me please? <Ask@For-It.Com>
    Re: Closure: which variable does it refer to? <ilya@math.ohio-state.edu>
    Re: Closure: which variable does it refer to? <joe+usenet@sunstarsys.com>
    Re: DBD::ODBC <goldbb2@earthlink.net>
    Re: Help: using constants from inherited parent class (Anno Siegel)
    Re: looking for current directories name <rlogsdon@eris.io.com>
    Re: My senior project is "done" <djberg96@hotmail.com>
    Re: My senior project is "done" (Sweth Chandramouli)
    Re: oh c'mon please, one of you perl/unix gurus!!! <boqichi0@earthlink.net>
    Re: ok problem solved, thx! Here's my SOLUTION in a sub <c_clarkson@hotmail.com>
    Re: Perl icon in Windows- reminder please <davsoming@lineone.net>
    Re: Pronouncing ISA (Abigail)
    Re: Searching for Postal Code <pne-news-20010521@newton.digitalspace.net>
    Re: Templates for Generating Calls to External Function (M. Simon Cavalletto)
        time of a file <Rene.Scheibe@gmx.net>
    Re: xtropia - Web_store <defont@nospam.iinet.net.au>
    Re: xtropia - Web_store <no@spam.net>
    Re: xtropia - Web_store <boqichi0@earthlink.net>
    Re: xtropia - Web_store <defont@nospam.iinet.net.au>
    Re: xtropia - Web_store <defont@nospam.iinet.net.au>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 20 May 2001 18:08:13 -0400
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Are compiled regexes global?
Message-Id: <m3n187vfle.fsf@mumonkan.sunstarsys.com>

Gavin Sherlock <sherlock@genome.stanford.edu> writes:

> Hi,
>    I have a search routine, that reads through a file looking for
> matches.  I construct a regex, based on whether they had wild-cards or
> not in their search criteria, and then use the /o modifier to compile it.  
                                         ^^^^^^^^^^^^^^^^^^^

Haven't you answered your own question then?  What happens if you
drop the /o ?

-- 
Joe Schaefer       "The surest protection against temptation is cowardice."
                                               --Mark Twain


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

Date: Sun, 20 May 2001 15:35:32 -0700
From: Gavin Sherlock <sherlock@genome.stanford.edu>
Subject: Re: Are compiled regexes global?
Message-Id: <200520011535324544%sherlock@genome.stanford.edu>

I guess I should have done that first - yes, if I drop the /o, it works
as expected, meaning they are global.  So my question now is, is there
a simple way around it?

Cheers,
Gavin


In article <m3n187vfle.fsf@mumonkan.sunstarsys.com>, Joe Schaefer
<joe+usenet@sunstarsys.com> wrote:

> Gavin Sherlock <sherlock@genome.stanford.edu> writes:
> 
> > Hi,
> >    I have a search routine, that reads through a file looking for
> > matches.  I construct a regex, based on whether they had wild-cards or
> > not in their search criteria, and then use the /o modifier to compile it.  
>                                          ^^^^^^^^^^^^^^^^^^^
> 
> Haven't you answered your own question then?  What happens if you
> drop the /o ?


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

Date: 20 May 2001 23:01:31 GMT
From: Tina Mueller <tinamue@zedat.fu-berlin.de>
Subject: Re: Are compiled regexes global?
Message-Id: <9e9icb$1mee0$1@fu-berlin.de>

hi,
Gavin Sherlock <sherlock@genome.stanford.edu> wrote:
> I guess I should have done that first - yes, if I drop the /o, it works
> as expected, meaning they are global.  So my question now is, is there
> a simple way around it?

way around what? either you want to let perl compile this
only once or not. if not, drop the /o.
maybe you want to use the operator qr{}.
perldoc perlop.
[fullquote deletd]

hth, tina
-- 
http://tinita.de    \  enter__| |__the___ _ _ ___
tina's moviedatabase \     / _` / _ \/ _ \ '_(_-< of
search & add comments \    \ _,_\ __/\ __/_| /__/ perception
please don't email unless offtopic or followup is set. thanx


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

Date: 20 May 2001 19:14:53 -0400
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Are compiled regexes global?
Message-Id: <m3itivvcia.fsf@mumonkan.sunstarsys.com>

Gavin Sherlock <sherlock@genome.stanford.edu> writes:

> I guess I should have done that first - yes, if I drop the /o, it works
> as expected, meaning they are global.  
                                ^^^^^^

When you say "global", you really mean something like 
"regexps with /o ignore any future changes to the variables within them", 
right?

See

  % perldoc perlop

for a description of the /o option.

> So my question now is, is there a simple way around it?

Now I'm totally confused- haven't you already answered your own 
question again? What's wrong with simply dropping the /o ?

If it's a performance problem, then I suggest you upgrade your 
perl installation to at least 5.00503.  Otherwise you might be 
able to use a magic null pattern, but constucting a dummy match
might be more difficult than just upgrading to a better perl.

HTH
-- 
Joe Schaefer     "A cynic is a man who knows the price of everything and the
                                      value of nothing."
                                               --Oscar Wilde


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

Date: 21 May 2001 01:53:00 -0400
From: Ala Qumsieh <aqumsieh@hyperchip.com>
Subject: Re: Are compiled regexes global?
Message-Id: <m3d793jlj7.fsf@alquds.qumsieh.homeip.net>


Gavin wrote:

>    I have a search routine, that reads through a file looking for
> matches.  I construct a regex, based on whether they had wild-cards or
> not in their search criteria, and then use the /o modifier to compile
> it.  If no hits are found, I add wild-cards to the search string, if
> they weren't there, and repeat the search.  Trouble is, it still
> doesn't get any hits.  I know that if I have wild-cards from the
> beginning, I have plenty of hits.  My suspicion is that the regex that
> was compiled is reused, even though it's a new call to the subroutine,
> and the $regex variable (which is lexically scoped) is different now. 
> So my question is:  are compiled regexes like a look-up in a global
> hash, as opposed to local to their subroutine?

As usual, RTFM :-)

Have a look at perlop. In the section 'Regexp Quote-Like Operators'
you'll find the following:

                                                     If you want
               such a pattern to be compiled only once, add a
               `/o' after the trailing delimiter.  This avoids
               expensive run-time recompilations, and is useful
               when the value you are interpolating won't change
               over the life of the script.  However, mentioning
               `/o' constitutes a promise that you won't change
               the variables in the pattern.  If you change them,
               Perl won't even notice.  See also the section on
               "qr//".

You should take that advice and have a look at qr//.

--Ala


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

Date: Sun, 20 May 2001 23:28:04 +0100
From: "Robb Meade" <Ask@For-It.Com>
Subject: Re: Can anyone help me please?
Message-Id: <9e9ga3$hqu$1@newsg2.svr.pol.co.uk>

On a less serious note, I have no knowledge of all things 'car' either :D

--

Robb Meade

Kingswood Web Services
www.kingswoodweb.net


"Craig Berry" <cberry@cinenet.net> wrote in message
news:tgg41odmh8174d@corp.supernews.com...
> Robb Meade (Ask@For-It.Com) wrote:
> : See, now that was more friendly... :)
> :
> : Maybe I'll hang around for a little longer...
>
> Glad I could help.
>
> : As I said though, its often difficult to make a coherent and 'short'
topic
> : when its not always clear what the problem is, or whats causing it, and
> : having no real knowledge of Perl doesnt help...
>
> The difficulty is that, unless you can do those things, it's unlikely we
> can help you at all.  If you are trying to fix your own car and ask a
> mechanic what kind of solenoid you need for a 98 Ford Taurus starter,
> he'll either tell you, or point you to the right reference material to
> find out.  If you say "My car doesn't work", he's more likely to hand you
> a rate sheet.  If you can't specify your problem well enough to state it
> briefly and specifically, odds are you aren't equipped to solve it
> yourself.  What you need then is a consultant, not help from this
> newsgroup.
>
> : I did actually solve the problem in the end...it wasnt really Perl
related
> : as it turns out...
>
> The fact that this was a high-probability outcome is part of what
> discouraged Perl experts from trying to help you.
>
> --
>    |   Craig Berry - http://www.cinenet.net/~cberry/
>  --*--  "God becomes as we are that we may be as he is."
>    |               - William Blake




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

Date: 21 May 2001 05:26:14 GMT
From: Ilya Zakharevich <ilya@math.ohio-state.edu>
Subject: Re: Closure: which variable does it refer to?
Message-Id: <9ea8tm$9ts$1@agate.berkeley.edu>

[A complimentary Cc of this posting was sent to
Ilmari Karonen 
<usenet11462@itz.pp.sci.fi>], who wrote in article <990392370.25050@itz.pp.sci.fi>:
> >The compiled form of a closure differs from usual subroutines by one
> >status bit only.  However, calculating a reference to a usual
> >subroutine (including anonymous ones - done in: sub {12}) is a simple
> >operation of creating a scalar of the type "reference".  Taking a
> >reference to a closure is much more involved: the subroutine "context"
> >(=scratchpad) is duplicated (and recalculated) at this moment.  The
> >generated reference variable contains a pointer to the new context.
> 
> I see.  Am I correct in assuming, however, that if perl did duplicate
> the context even for usual subroutines, the only difference visible to
> the user would be in performance?

Maybe no.  I think subroutines "embedded" into other subroutines might
have changed semantic if they mention lexicals of the outside scope.

Depends on what you call "duplication" of the context...

Ilya


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

Date: 21 May 2001 01:29:57 -0400
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Closure: which variable does it refer to?
Message-Id: <m3d793uv56.fsf@mumonkan.sunstarsys.com>

Ilya Zakharevich <ilya@math.ohio-state.edu> writes:

> Let me restate it.  Perl will make an anonymous subroutine into a
> closure *only if* the compiler discovers that the subroutine is
> referencing an "outside" lexical (or an "embedded" anonymous
> subroutine does this).
> 
> The compiled form of a closure differs from usual subroutines by one
> status bit only.  However, calculating a reference to a usual
> subroutine (including anonymous ones - done in: sub {12}) is a simple
> operation of creating a scalar of the type "reference".  Taking a
> reference to a closure is much more involved: the subroutine "context"
> (=scratchpad) is duplicated (and recalculated) at this moment.  The
> generated reference variable contains a pointer to the new context.

This distinction is observable by looking at the CODE's "address",
right?

> This duplication is done at runtime if the status bit (set at compile
> time) is set.  So it is important to know when this bit is set - and
> the rule is stated above.


So is the following a "context recalculation" bug?

#!/usr/bin/perl -wl
  use strict;
  $a = foo();

  {
    my $x = "bar";
    sub foo {
        # $x;                   # not so useless :-)
	return sub {$x};
    }
  }

  $b = foo();

  print $a->();
  print $b->();

__END__

Output:
bar
Use of uninitialized value at /tmp/try.pl line 16.


-- 
Joe Schaefer    "The opposite of a correct statement is a false statement. The
                  opposite of a profound truth may well be another profound
                                           truth."
                                               -- Niels Bohr


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

Date: Mon, 21 May 2001 02:16:54 -0400
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: DBD::ODBC
Message-Id: <3B08B2D6.A8E23BB@earthlink.net>

Michael R. McPherson wrote:
> 
> "Chris" <cpryce@pryce.net> wrote in message
> news:B7144E7F.3E81%cpryce@pryce.net...
> > in article dwilga-MUNGE-62C8AB.10572230042001@nap.mtholyoke.edu, Dan
> > Wilga at dwilga-MUNGE@mtholyoke.edu wrote on 04/30/2001 9:57 AM:
> [SHORT]
> > If you're running Apache, you can also use the SetEnv directive to
> > set the environment variables for the Web server.
> >
> > See: http://httpd.apache.org/docs/env.html (or
> > http://httpd.apache.org/docs-2.0/env.html for version 2.0 docs)
> >
> > For more information.
> 
> Thanks Chris ... That did the trick.  I had to set both the ODBCINI
> and UDBCINI paths in apache.

I don't pretend to understand DBD::ODBC, but you could probably also do
it by assigning to $ENV{ODBCINI} and $ENV{UDBCINI} in a BEGIN block
before the "use DBD::ODBC" line.

Of course, this is slightly less portable than having Apache set them,
but what you *can* do to enhance portability, is have your perl script
do a test to see if they're set, and croak if they aren't (with an
appropriate (uesful!) error message).  Since you now know what the
problem was, and are having apache set those environment variables, it
won't effect your script at present, but if you move to a new machine,
it will let you quickly figure out what's wrong without having to ask
here again.

-- 
Customer: "I would like to try on that suit in the window."
Salesman: "Sorry sir, you will have to use the dressing room."


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

Date: 21 May 2001 06:38:50 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Help: using constants from inherited parent class
Message-Id: <9ead5q$92g$1@mamenchi.zrz.TU-Berlin.DE>

According to Abigail <abigail@foad.org>:
> Anno Siegel (anno4000@lublin.zrz.tu-berlin.de) wrote on MMDCCCXVIII
> September MCMXCIII in <URL:news:9e5vhs$7fq$2@mamenchi.zrz.TU-Berlin.DE>:
> %%  According to Michael Ströck <michael@stroeck.com>:
> %% > 
> %% > "Abigail" <abigail@foad.org> schrieb im Newsbeitrag
> %% > news:slrn9gbe3f.anl.abigail@tsathoggua.rlyeh.net...
> %% > >
> %% > > I've never understood why. I've always learned that use of constants
> %% > > was a good thing, and that duplication of data should be avoided.
> %% > >
> %% > > Doesn't the school of OO agree?
> %% > <snip>
> %% > 
> %% > I agree with Abigail. Can someone point out some disadvantages to that ?
> %% > And don't say "It's not OOP" ;-)
> %%  
> %%  Using a constant and exporting its name into the user's name space
> %%  are different things.  If you're going OO, a constant DIM in class
> %%  Vector is a class method and can be called as such:
> 
> FUD.
> 
> Almost anything that exports something either uses Exporter, or offers
> its functionality. Exporter doesn't force *anything* in the users name
> space.

 ...nor did I mention "forcing" anywhere.  Exporting is transplantation
of a symbol from one package to another, forced or by request.  This
is not the "done thing" in OO, and my point is just that you can
access Perl constants with OO methods.

>        Two additional chars make Exporter not export anything.

The two characters "_OK"?

Anno


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

Date: Sun, 20 May 2001 18:40:33 -0500
From: Reuben Logsdon <rlogsdon@eris.io.com>
Subject: Re: looking for current directories name
Message-Id: <Pine.LNX.4.21.0105201839080.32755-100000@eris.io.com>


there is no internal Perl way to get this info.  at least not with a
single built-in function

The Cwd.pm module will do it for you, and that module seems to be pretty
widely distributed.

example:

E:\>perl
use Cwd;
print &cwd();
^D
E:

Regards,
REuben


On 20 May 2001, Thomas wrote:

> Hi,
> 
> I can't find a perl function that wil tell me the name of the current
> directory. Any clues what to use ?
> 
> Thanks,  Thomas
> 
> 
> 

-- 
Regards,
Reuben Logsdon

http://www.io.com/~rlogsdon/




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

Date: Mon, 21 May 2001 02:35:08 GMT
From: "Daniel Berger" <djberg96@hotmail.com>
Subject: Re: My senior project is "done"
Message-Id: <w9%N6.34081$V6.1671637@typhoon.mn.mediaone.net>


"Cato" <not_a_pack_animal@yahoo.com> wrote in message
news:8e5b6c2b.0105191558.23a9eb74@posting.google.com...
> My senior project (comprised of a perl script and java applets) can be
> found here:
>
> http://www.geocities.com/uhdseniorproject
>
> I got an A! And a BS in Computer Science cum laude with a 3.8+ major
> GPA ...and...and...and...I am available for employment!
>
> Quell your enthusiasm....

Some (hopefully) helpful suggestions...

1) use -w
2) use strict
3) use "my" for variables within subroutines unless you *really* want them
to be global
4) work on your indentation and spacing (that could be HTML rendering, I
suppose).
5) you spelled DEBUG wrong.  Ok, just messing with ya
6) check for failure when doing "open()" or "close()".  You never know...
7) I don't know for sure, but there's got to be a better way of doing this
doozy:

   if(((index($urlcontent,$conf))> -1)||((index($urlcontent,$USeco))> -1)
   ||((index($urlcontent,$theEco))> -1)||((index($urlcontent,$consem)) > -1)
   ||((index($urlcontent,$oil))> -1)||((index($urlcontent,$perbarrel))> -1)
   ||((index($urlcontent,$recession))> -1)||((index($urlcontent,$alan))> -1)
   ||((index($urlcontent,$oureco))> -1)){ ... }

Regards,

Dan





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

Date: Mon, 21 May 2001 03:53:02 GMT
From: sweth+perl@gwu.edu (Sweth Chandramouli)
Subject: Re: My senior project is "done"
Message-Id: <yi0O6.13894$G5.2797284@news1.rdc1.md.home.com>

In article <w9%N6.34081$V6.1671637@typhoon.mn.mediaone.net>,
Daniel Berger <djberg96@hotmail.com> wrote:
>7) I don't know for sure, but there's got to be a better way of doing this
>doozy:
>
>   if(((index($urlcontent,$conf))> -1)||((index($urlcontent,$USeco))> -1)
>   ||((index($urlcontent,$theEco))> -1)||((index($urlcontent,$consem)) > -1)
>   ||((index($urlcontent,$oil))> -1)||((index($urlcontent,$perbarrel))> -1)
>   ||((index($urlcontent,$recession))> -1)||((index($urlcontent,$alan))> -1)
>   ||((index($urlcontent,$oureco))> -1)){ ... }
	At the very least, some whitespace, indentation, and linebreaks
would help.  I haven't looked at the OP's original script, but from what is
here, it looks like the point is to execute some block of code if any of a
list of web pages can be retrieved.  If that's the case, I think a much
cleaner way to do it would be to iterate across a list of potential targets:

PAGE: for my $page (@page_array) {
   if (index ($urlcontent, $page) > -1) {
      #code to execute goes here
      last PAGE;
   };
};

	-- Sweth.

-- 
Sweth Chandramouli ; <sweth+perl@gwu.edu>


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

Date: Mon, 21 May 2001 02:39:55 GMT
From: Franco Luissi <boqichi0@earthlink.net>
Subject: Re: oh c'mon please, one of you perl/unix gurus!!!
Message-Id: <3B08ABBD.7D888E1E@earthlink.net>



>
>
> That shouldn't be a shell prompt.
>
> It looks like this on my machine:
>

oh, duh, i was confused - cause i was already SSHing to the machine....anyway,
did it and got this (looks like is *is* Apache afterall!)

HTTP/1.1 200 OK
Date: Mon, 21 May 2001 02:33:24 GMT
Server: Apache/1.2.6 FrontPage/3.0.4
Connection: close
Content-Type: text/html

Connection closed by foreign host.

now i'm back to my original problem, where are the config files/ (how) can i get
it to recognize the new perl...?

>
>
> >really, a restart wont do it?  That sucks...what do you mean reconfigure it?
>
> I didn't say restart.  Like I said you need the server admin to do that for
> you.
>

you said it needs a rebuild/recompile, i was just asking (if/why?) a restart
wouldn't do it ...



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

Date: Sun, 20 May 2001 17:46:34 -0500
From: "Charles K. Clarkson" <c_clarkson@hotmail.com>
Subject: Re: ok problem solved, thx! Here's my SOLUTION in a sub routine :-)
Message-Id: <E1EA8C05101BB7D8.68B5F32DDA5A45B7.3B51B4ADF4DB6485@lp.airnews.net>

Lars <Lars.Plessmann@gmx.de> wrote:

: sub MoneyFormat
: {
:  # currency format adding commas for easy read
:  my $buf=0;

    What's $buf for?

:  local $_ = shift;
:  1 while s/^([-+]?\d+)(\d{3})/$1,$2/;

    Since the pattern includes the ^ anchor there is never
more than 1 match, right? So why the 1 while?

:
:  # rounding the currency
:  $_=sprintf("%.02f", $_);
:
:  # Change dots to comma and comma to dots (German form)
:  tr/,./.,/;
:
:  return $_;
: }
:

    print MoneyFormat(3000);

prints:
    3,00

    Shouldn't it be 3,000.00 or 3.000,00?


Charles K. Clarkson








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

Date: Mon, 21 May 2001 06:49:47 +0100
From: "David Soming" <davsoming@lineone.net>
Subject: Re: Perl icon in Windows- reminder please
Message-Id: <tghao9an905p39@corp.supernews.co.uk>


"Gwyn Judd" <tjla@guvfybir.qlaqaf.bet> wrote in message
news:slrn9ggc8p.h1u.tjla@thislove.dyndns.org...
> "Mein Lufkissenfahrzeug ist voller Aale"
> said David Soming (davsoming@lineone.net) in
> <tgg6nf88njaf4c@corp.supernews.co.uk>:
> >The extension ".pl" displays an icon on my machine which prevents edit
> >using notepad.  Anyone remind me how to change this so I can use
> >notepad... I forgot how to do it!
>
> Shift-Right click on the file. Choose "Open With".
>
Ha!
Highlight first>shift>right click> Choose Open With...
Thanks for the prompt

David





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

Date: Mon, 21 May 2001 06:45:26 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: Pronouncing ISA
Message-Id: <slrn9ghec6.ods.abigail@tsathoggua.rlyeh.net>

Craig Berry (cberry@cinenet.net) wrote on MMDCCCXIX September MCMXCIII in
<URL:news:tgfsoa4n1qdue6@corp.supernews.com>:
@@  Abigail (abigail@foad.org) wrote:
@@ : Actually, it took me 3 years of working with Perl to recognize the
@@ : "IS-A" meaning. I blame not only not being a native English speaker,
@@ : but also having a somewhat different view about OO.
@@  
@@  I grokked it immediately, but only because I taught OO in other languages
@@  years ago, and found that teaching the distinction between is-a and has-a
@@  early and often was the key to making class design comprehensible.  As a
@@  result, I'm sensitized to those (compound) words.


For me, it isn't "Dog IS-A Mammal", but "Dog INHERITS Mammal".

It means the same thing, but I was used to a different terminology,
and hence a different metaphore.


Abigail
-- 
perl -Mstrict='}); print "Just another Perl Hacker"; ({' -le1


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

Date: Mon, 21 May 2001 08:04:45 +0200
From: Philip Newton <pne-news-20010521@newton.digitalspace.net>
Subject: Re: Searching for Postal Code
Message-Id: <fgbhgtkj2l89ci89669rkgue5f65shsv69@4ax.com>

On Sun, 20 May 2001 08:08:49 +0200, Philip Newton
<pne-news-20010520@newton.digitalspace.net> wrote:

> On Sat, 19 May 2001 16:05:18 GMT, mjd@plover.com (Mark Jason Dominus)
> wrote:
> 
> >   my %l2p
> 
> Can't use global %12 in "my" at -e line 1, near "my %12"
[snip]
> Don't you test your code before posting? :) :) :)

The moral of the story here is, I guess, to use copy and paste rather
than retyping. I thought mjd has used percent-twelve-pee, since "one"
and "lowercase ell" look the same in the font I sue to read news. Sorry.

Cheers,
Philip
-- 
Philip Newton <nospam.newton@gmx.li>
That really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.


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

Date: 20 May 2001 16:54:38 -0700
From: simonm@evolution.com (M. Simon Cavalletto)
Subject: Re: Templates for Generating Calls to External Functions
Message-Id: <49eabe45.0105201554.10cedf63@posting.google.com>

"Sam Lay" <sam.lay@mindspring.com> wrote in message news:<9e3cna$765$1@slb4.atl.mindspring.net>...
> Are you aware of a module that would support the expression of the
> "grammer" for such calls and the creation of a decision tree to
> support the synthesis of suitable call sequences. [...] It is the
> creation of the data structure to serve as a template for the function
> calls that has me stumped. Alas, I have no experience in implementing
> parsers or compilers and I shudder at the thought of having to write
> different functions to support each of the many forms that the
> external functions follow.

You might want to have a look at some code I'm working on:

  http://work.evolution.com/dist/Class-MethodGenerator-1.0.12.tar.gz

In particular, the Class::MethodGenerator::Template module supports
the creation of a "method template," a hash of grammar rules and
options, stitches the grammar together with a simple text-based
substitution function, and then uses evals and closures to install
subroutines in the desired package. (See TextBuilder for the
substitution grammar and Universal for some simple examples.)

Although the package is named MethodGenerator, you can also use it to
create non-OO subroutines.

It is very much still under development, but let me know if it seem
like it might be useful...

-Simon


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

Date: Mon, 21 May 2001 08:58:50 +0200
From: "Rene Scheibe" <Rene.Scheibe@gmx.net>
Subject: time of a file
Message-Id: <9eae97$1q5ma$1@ID-65612.news.dfncis.de>

How do I get the date, time and so on of a file?




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

Date: Mon, 21 May 2001 09:12:54 +0800
From: "Banshee" <defont@nospam.iinet.net.au>
Subject: Re: xtropia - Web_store
Message-Id: <3b086b95$0$27469@echo-01.iinet.net.au>

Perl and CGI where just examples of what my ISP will allow.

I was prematurely excited just then, I thought someone had answered my
question. Do u know the answer?



> Perl is a language.
>
> CGI is not a language.
>
>
> --
>     Tad McClellan                          SGML consulting
>     tadmc@augustmail.com                   Perl programming
>     Fort Worth, Texas




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

Date: Mon, 21 May 2001 01:47:50 GMT
From: "Misanthrope" <no@spam.net>
Subject: Re: xtropia - Web_store
Message-Id: <at_N6.3742$BN6.408256@newsread1.prod.itd.earthlink.net>

www.perlshop.org


"Banshee Smith" <defont@ii.net> wrote in message
news:2d45f5bf.0105200805.16c74e34@posting.google.com...
> Hi,
> I was wondering if anyone was still using this Web_store from Selena
> Sol (www.extropia.com)?
> I am trying to make HTML templates for the pages and am just a little
> perplexed as to where to put the code. (And yes i am new to perl). As
> it will have to be hosted on an ISP web server I am quite limited to
> the languages I can use. (Perl and cgi are ok)
> Does anybody who reads this know of a current alternative for
> web_store?
>
> Thanks in advance.
>
> Ban.
>




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

Date: Mon, 21 May 2001 02:32:55 GMT
From: Franco Luissi <boqichi0@earthlink.net>
Subject: Re: xtropia - Web_store
Message-Id: <3B08AA2D.32982C1@earthlink.net>

the code on extropia sucks.  i would not try to work with it if i were
you.



Misanthrope wrote:

> www.perlshop.org
>
> "Banshee Smith" <defont@ii.net> wrote in message
> news:2d45f5bf.0105200805.16c74e34@posting.google.com...
> > Hi,
> > I was wondering if anyone was still using this Web_store from Selena
> > Sol (www.extropia.com)?
> > I am trying to make HTML templates for the pages and am just a little
> > perplexed as to where to put the code. (And yes i am new to perl). As
> > it will have to be hosted on an ISP web server I am quite limited to
> > the languages I can use. (Perl and cgi are ok)
> > Does anybody who reads this know of a current alternative for
> > web_store?
> >
> > Thanks in advance.
> >
> > Ban.
> >



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

Date: Mon, 21 May 2001 10:43:24 +0800
From: "Banshee" <defont@nospam.iinet.net.au>
Subject: Re: xtropia - Web_store
Message-Id: <3b0880cb$0$27464@echo-01.iinet.net.au>

While perlshop looks great, it is still quite similar to web_store, and
written around the same time.
I would like to see how HTML templates are used in these stores so that I
can create my own. I have read how to do similar using perlmod, but I don't
think my ISP will support that.
(Correct me if I am misinformed)

Basically I would like my database when searched to open up in the html
template, rather than have header/footer only. As this code has required
libraries, will that make a difference to how i do it?
I have been at this for over a month and am going mad. So any help at all
would be appreciated.


"Misanthrope" <no@spam.net> wrote in message
news:at_N6.3742$BN6.408256@newsread1.prod.itd.earthlink.net...
> www.perlshop.org
>
>
> "Banshee Smith" <defont@ii.net> wrote in message
> news:2d45f5bf.0105200805.16c74e34@posting.google.com...
> > Hi,
> > I was wondering if anyone was still using this Web_store from Selena
> > Sol (www.extropia.com)?
> > I am trying to make HTML templates for the pages and am just a little
> > perplexed as to where to put the code. (And yes i am new to perl). As
> > it will have to be hosted on an ISP web server I am quite limited to
> > the languages I can use. (Perl and cgi are ok)
> > Does anybody who reads this know of a current alternative for
> > web_store?
> >
> > Thanks in advance.
> >
> > Ban.
> >
>
>




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

Date: Mon, 21 May 2001 10:55:39 +0800
From: "Banshee" <defont@nospam.iinet.net.au>
Subject: Re: xtropia - Web_store
Message-Id: <3b0883aa$0$27459@echo-01.iinet.net.au>

Oh really? Great. :( I wish I knew that sooner. I've been learning perl
using the script.


"Franco Luissi" <boqichi0@earthlink.net> wrote in message
news:3B08AA2D.32982C1@earthlink.net...
> the code on extropia sucks.  i would not try to work with it if i were
> you.
>
>
>
> Misanthrope wrote:
>
> > www.perlshop.org
> >
> > "Banshee Smith" <defont@ii.net> wrote in message
> > news:2d45f5bf.0105200805.16c74e34@posting.google.com...
> > > Hi,
> > > I was wondering if anyone was still using this Web_store from Selena
> > > Sol (www.extropia.com)?
> > > I am trying to make HTML templates for the pages and am just a little
> > > perplexed as to where to put the code. (And yes i am new to perl). As
> > > it will have to be hosted on an ISP web server I am quite limited to
> > > the languages I can use. (Perl and cgi are ok)
> > > Does anybody who reads this know of a current alternative for
> > > web_store?
> > >
> > > Thanks in advance.
> > >
> > > Ban.
> > >
>




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

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.  

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 946
**************************************


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