Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: ref in @INC and debugging

by IlyaM (Parson)
on Mar 07, 2003 at 17:04 UTC ( #241177=note: print w/ replies, xml ) Need Help??


in reply to ref in @INC and debugging

I tried to decypher your code but I give up. It is simply unreadable mess. I doubt you will understand it yourself after a week. Some hints:

  1. Use strict and warnings
  2. Use human readable variable names. When I see $n, $m, etc it say me nothing.
  3. Split large code chunks on subroutines with human readable names.
  4. Don't use exotic Perl features just because you can (i.e. code refs in @INC to convert templating language in Perl code on fly). There are much simplier ways to do the same thing (compile template in Perl code). Take a look on existing templaiting modules to see how. BTW probably they already do what you want or can be easily extended to do it.
  5. If you need to restrict power of Perl expressions you need to use Safe. Parsing Perl code is tricky.

--
Ilya Martynov, ilya@iponweb.net
CTO IPonWEB (UK) Ltd
Quality Perl Programming and Unix Support UK managed @ offshore prices - http://www.iponweb.net
Personal website - http://martynov.org


Comment on Re: ref in @INC and debugging
Re: Re: ref in @INC and debugging
by Anonymous Monk on Mar 07, 2003 at 17:49 UTC
    Zu 4. It's not because I can. It's because I can't. Install modules I mean. (Pure perl is okay. But counts against mem)
      Don't use Perl if your mem is that restricted. Use C or ASM. Or, talk to your sysadmin to get the appropriate modules installed. Some jobs just can't be done, given enough restrictions.

      ------
      We are the carpenters and bricklayers of the Information Age.

      Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

      Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

        Not RAM, HD. And C is not an option either, because its source or nothing. No binaries allowed.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://241177]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2014-09-21 01:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (165 votes), past polls