On Fri, Apr 09, 2004 at 03:02:00PM +0200, Jens Rieks wrote:
> Hi,
> 
> On Thursday 08 April 2004 23:49, Tim Bunce wrote:
> > On Thu, Apr 08, 2004 at 08:28:49PM +0200, Jens Rieks wrote:
> > > Data::Replace replaces every occurrence of one PMC in a nested data
> > > structure with another PMC.
> >
> > I'm not sure what that means, but Data::Replace seems too vague.
> > What is it?
>
> if you have a data structure [A, B, [C, D, E], C, D, E], where each letter 
> represents a PMC. With Data::Replace, you can for example replace each D PMC 
> with another PMC value.
> Do you have a better name for it?

Perhaps Data::DeepReplacePMC

(We've learnt the hard way with Perl5 modules names that more words are good.
Keeping module names very short is a false economy.)

> > > Data::Escape contains a function "String" that escapes the string.
> >
> > Wouldn't escape_string be better?
>
> What would be redundant, the namespace already contains "Escape".

You're assuming that the name will always be seen in the context
of it defining module. That may not be the case in the future.

> > (And I wonder how different languages escape strings,
> > and if there's a common subset that'll work for all/most of them.)
>
> Its C and PIR like escaping, it relaces some ASCII code with \n, \t, \r and 
> replaces ' with \' in strings quoted with ', and " with \" in strings quoted 
> with ".

escape_string_cstyle perhaps

Tim.

> > Tim [wearing a tired old namespace police hat]
> :-)
> 
> jens

Reply via email to