Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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,
Quality Perl Programming and Unix Support UK managed @ offshore prices -
Personal website -

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://241177]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2018-02-21 00:19 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (274 votes). Check out past polls.