[DCPM] shorthand required

Neil Williams linux at codehelp.co.uk
Thu Feb 15 11:17:47 PST 2007


On Thu, 15 Feb 2007 18:48:30 +0000
Steve Marvell <steve at devon-it.co.uk> wrote:

> Neil Williams wrote:
>
> > if ($g->{type} eq 'pilot_address')
> > {
> > 	my $c = new Contact;
> > 	$c->entryCity($g->{'string'}->[0]->{content});
> > }
>
> Where does the entryCity subroutine come from?

>From the original C source code of the C object - in this case, used by
pilot-qof.

The perl scripts are not handling their own data, this is data from
third-party sources (generally C applications) that perl is converting
into the formats required by other third-party sources. Neither the
import format nor the export format are designed with perl in mind.
Neither format can be modified. The old middleware problem.

> Is there a good reason you're using a subroutine over simply setting
> it directly?

That would still need the variable "entryCity" to be translated into a
variable name.

What's the syntax for setting a variable directly when the variable
name is itself a variable?

--


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/devoncornwall-pm/attachments/20070215/290d8d26/attachment.bin 


More information about the Devoncornwall-pm mailing list