The problem is that over time each person's way of putting $b into this template string varied based on their personal tastes. So we have all of the following in this column in the database.
and the problem with this comes when you want to create a SQL SELECT statement to pull out a row when one of the join criteria is this column. Because, instead of writing:p${b}.zip p{$b}.zip p$b.zip
I have to writeSELECT * FROM table WHERE file_format='p$b.zip'
SELECT * FROM table WHERE file_format='p$b.zip' or file_format='p{$b}.zip' or file_format='p${b}.zip'
and I have the willies because I'm not sure if I have covered all the ways that such variable interpolation can take place.
On the other hand, you might comment on my dilemma as a lesson in business logic as discussed in davorg's "Data Munging with Perl". All business logic should be in classes and hence the policy for this field read and write processing should have been in a class where the template string was generated in invariant Perl code as opposed to however it was done here (I wasn't around when it was done and don't want to stress anyone in this poor economy for fear of being kicked out into the streets).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid) Re: TMTOWTDI isn't best in this case
by Ovid (Cardinal) on Jul 24, 2001 at 02:41 UTC | |
|
Re: TMTOWTDI isn't best in this case
by cforde (Monk) on Jul 24, 2001 at 03:27 UTC | |
|
(MeowChow) Re: TMTOWTDI isn't best in this case
by MeowChow (Vicar) on Jul 24, 2001 at 02:31 UTC | |
by princepawn (Parson) on Jul 24, 2001 at 03:22 UTC | |
by Ovid (Cardinal) on Jul 24, 2001 at 03:41 UTC | |
by MeowChow (Vicar) on Jul 24, 2001 at 03:28 UTC | |
|
Re: TMTOWTDI isn't best in this case
by eejack (Hermit) on Jul 24, 2001 at 06:50 UTC | |
|
(ichimunki) Re: TMTOWTDI isn't best in this case
by ichimunki (Priest) on Jul 24, 2001 at 15:58 UTC |