Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Storing external data in PMCs
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Arthur Bergman  
View profile  
 More options Oct 27 2003, 10:50 am
Newsgroups: perl.perl6.internals
From: s...@nanisky.com (Arthur Bergman)
Date: Mon, 27 Oct 2003 15:35:42 +0000
Local: Mon, Oct 27 2003 10:35 am
Subject: Re: Storing external data in PMCs

On Monday, October 27, 2003, at 03:26  pm, Melvin Smith wrote:

> At 02:56 PM 10/27/2003 +0000, Arthur Bergman wrote:
>> So I am currently trying to do a Perl5LVALUE pmc, a stumbling block
>> is however that I need to pass the PMC the thing that it is
>> lvalueling, I was planning to use the pmc data field for storing this
>> but I cannot access it as a extender without violating the API and
>> guessing at layouts which is kind of bad (Dan says so ;)

> I don't know Perl5 internals enough to know exactly what Perl5LVALUE
> does. Do you want a way to pass a value to the PMC and let the PMC
> type morph
> itself based on the data representation?

> -Melvin

An lvalue holds usually a function, and when set is called that
function is called. So no morthing required at all!

For example:

perl -le '$foo = hi; $bar = \substr($foo,1); print "$bar-$foo"; $$bar =
"b"; print "$bar-$foo"';
LVALUE(0x513ec)-hi
LVALUE(0x513ec)-hb

so the reference points to a lvalue which has a reference to $bar and a
special function on the set to actually execute the substr.

The reason I am starting with this is that it is so obscure that it is
hardly used anywhere and is limited to a few small areas in the core
making it a good testing ground.

Arthur


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.