in reply to Re: Interpolating Property strings help.
in thread Interpolating Property strings help.

sauoq,

Thank you for the suggestions. I will try the regex this monday. I need to reply to a couple of your points though

Get rid of your isDefined() subroutine. All it is doing is allowing you to replace
I am not the only one who uses this function. It has great meaning somewhere else

Consider making your regexen more robust in general.
The regex I chose is exactly what I am requireing. There is to be no whitespace allowed when expanding property values

The $substituteThis and $substituteWith variables were used before I asked for help. I just hadn't pruned them out yet. I will rename $extractedVariable to $extractedVariableName

The style thing. I come from a C programming background into a Perl and then Java. My preference is the Java variety.


Kristofer Hoch

Si vos can lego is, vos es super erudio

  • Comment on Re: Re: Interpolating Property strings help.

Replies are listed 'Best First'.
Re^3: Interpolating Property strings help.
by Aristotle (Chancellor) on Jan 25, 2003 at 12:07 UTC

    A routine that turns defined $hashref->{$key} into $self->isDefined($hashref, $key) doesn't seem to have any purpose other than obfuscation to me. At least as far as I'm concerned, your code immediately became twice as clear once I substituted that for defined.

    Maybe it's an interface consistence thing that makes you have this method in your class - but that doesn't mean your routine should be using it.

    Makeshifts last the longest.