Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] SPELL > SCRIPT

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Jaka Kranjc <smgl AT lynxlynx.info>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] SPELL > SCRIPT
  • Date: Thu, 24 May 2012 11:48:04 +0200

On Thursday 24 of May 2012 11:33:03 Thomas Orgis wrote:
> Am Thu, 24 May 2012 21:19:10 +1200
>
> schrieb AbH Belxjander Draconis Serechai <belxjander AT gmail.com>:
> > wholesale replacement using a grep?
>
> Something along that, yes. Though, naturally, I'd do something along
>
> perl -pi -e 's:\$\{SCRIPT_DIRECTORY\}:\${SPELL_DIRECTORY}:g;
> s:\$SCRIPT_DIRECTORY:\$SPELL_DIRECTORY:g;' $spell_file
>
> others would use sed ... but, well, that is not the point: The point is
> whether we should start an argument about ${varname} vs. $varname;-)
The regex would have to be improved though, since there are also "legitimate"
uses of the bracy form around, for example when the variable name is followed
by any [[:alpha:]_]. I doubt there's many in spell files, if any at all
though,
so a manual inspection of everything that isn't followed by a slash may be
enough.

Does it make sense? Both are just styling options, so I have no real argument
for or against either.

LP
--
To err is humor




Archive powered by MHonArc 2.6.24.

Top of Page