Re: getting values of lexical variables in subs

2003-06-06 Thread Jenda Krynicky
From: $Bill Luebkert [EMAIL PROTECTED]
 You know, I've never found the need to create a sub embedded in a sub.

Well I did quite often. In (Turbo) Pascal where it did make sense. 
(If I remember well.)
In Perl it doesn't. And I think Perl should print a warning if you 
ever do it. (Except of course for closures. The warning would only 
warn about named subs. Now it obnly warns if you accidentaly create a 
closure.)

:-)

Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery

___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


RE: Why is PHP popular?

2003-06-06 Thread FARRINGTON, RYAN
Title: RE: Why is PHP popular?





Yes, I feel I know perl well enough to make money with it... Although my skill set it not dedicated to PERL it is just another language in the list. For me perl is a tool to assist in Server Administration and not a primary source for my income.

-Original Message-
From: Jim Schueler [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 05, 2003 9:07 AM
To: [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: Why is PHP popular?



OK. I've got my own newbie question: How can a Perl programmer with 
many years of Web development experience feed himself and his family?


In this post-DotCom-bust world, all of my potential business is jobbed to 
inhouse or agency Art Directors. Art Directors use programmers as a 
last resort. They live off those free throwaway scripts as much as they 
rely on stock photography (but without the royalties) and usually
discourage the customer from spec'ing anything more technically advanced.


In the interest of improving my appeal to the Art Director market, I'm
reconsidering my long-time practice of in-lining code. Art Directors hate 
inline code because the programmer controls the final deliverable.


So regarding Mr. Friberg's recommendation below, I'd be more interested in
an alternative to yet-another-scripting-language that does away with inline
code altogether. If there's enough interest, I can probably justify a 
reasonable investment of time. On the other hand, I'd be just as happy if
someone has an easy answer to the above question.


Jim Schueler
http://www.tqis.com/



Robert Friberg wrote:


 Hi all,

 I've had the sad opportunity to work with PHP on a
 few small projects.

 PHP as a language is seriously flawed, yet it
 is very popular and widespread. I believe this
 is due to the concept of inlining the code
 directly, as also with ASP and JSP.

 If the perl community had had an equivalent
 and pushed for it up front then a weed like
 php would probably never have emerged.

 I wonder if it's too late for that now?

 Apache::ASP is a candidate, www.apache-asp.org,
 but needs mod_perl so installation is too
 complicated for many.

 The installation should be a no-brainer:

 - Drop the .so/.dll into *this* directory
 - Add *these* 4 lines to httpd.conf
 - Put code between % % -tags in a file
 with a .psp extension

 mvh,
 #---
 # Robert Friberg perl,java,xml,uml,sql,delphi,
 # Systemutvecklare c/c++,vb,php,linux,apache
 # 0733-839080
 #
 # Ensofus AB linuxservrar,serverhosting,
 # www.ensofus.se internetsystem, Miljö Online
 #---

 ___
 ActivePerl mailing list
 [EMAIL PROTECTED]
 To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


--
Even the safest course is fraught with peril.



___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



-- 


___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





Public properties for a silent installation of ActivePerl?

2003-06-06 Thread Peter McGowan
Hi

I'm installing ActivePerl from a script, using the line:

msiexec /i ActivePerl-5.6.1.635-MSWin32-x86.msi /qb ROOTDRIVE=C:\

In the resulting installation however, the .pl file association is not made,
and the c:\perl\bin hasn't been added to the system path.

Is there an MSI property I can use to enable this functionality in a silent
install?

Thanks,
Peter
___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Class variables

2003-06-06 Thread $Bill Luebkert
Mohammed Khatib wrote:
 Dear Perl people,
 
 I'm just wondering about the set up of class variables in a Perl class.
 Say I have something like the following:
 
 ==
 sub new
 {
 # fetch class name
 my $class = shift;
 
 # create object
 my $self = {
 _path = shift,
 };
 
 # open input definition file
 open(DEF, $self-{_path})
 or die \n
 . __PACKAGE__
 . : Couldn't open definition file for reading! - 
 . $self-{_path}
 . \n;
 
 # read in entire file
 # @def is a global variable here, global in the module only that is
 @def = DEF;
 
 bless $self, $class;
 }
 
 ==
 
 Now, with the initialisation of the global @def array, is there any benefit
 of initialising this array as
 
 $self-{_def = DEF} instead of having an explicit global array @def?

What happens to @def on your second new call ?

-- 
  ,-/-  __  _  _ $Bill LuebkertMailto:[EMAIL PROTECTED]
 (_/   /  )// //   DBE CollectiblesMailto:[EMAIL PROTECTED]
  / ) /--  o // //  Castle of Medieval Myth  Magic http://www.todbe.com/
-/-' /___/__/_/_http://dbecoll.tripod.com/ (Free site for Perl/Lakers)


___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs