On Mar 1, 2007, at 11:30 AM, Ted Zlatanov wrote:
> TZ> You could use a TEMP column. I don't know if it can be used to
> store
> TZ> arbitrary data, but I don't remember such a limitation when I
> looked
> TZ> at the code. I hope I understood what you are asking.
> caveat: this just stores entries in the hash, so you need to make sure
> TEMP columns don't interfere with regular ones. They are not columns
> anyhow, just attributes, but I'm used to calling them TEMP columns
> from the CDBI days...
Aren't temp columns accessible externally though? I don't want this
sort of data externally available.
Long story short, I have a bunch of mixin methods that deal with url
and address munging...
stuff like
'get_host_name'
'get_domain_name'
'get_email_server'
'get_alt_myspace_id'
etc
they all do some repettive tasks, and are often called multiple times
some of them are really simple, but others like get_alt_myspace_id
can be dozens of lines of code -- and might get called 6+ times on a
page view.
so i've been caching results internally on the object, as such:
sub get_host_name {
my ( $self , $field , $force );
if ( exists $self->{'com.2xlp.helpers'}{'get_host_name'}{ $self->
$field } ) {
return $self->{'com.2xlp.helpers'}{'get_host_name'}{ $self->
$field } unless defined $force;
}
my $value;
eval {
# stuff here
};
$self->{'com.2xlp.helpers'}{'get_host_name'}{ $self->$field }= $value;
return $value;
}
// Jonathan Vanasco
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rose-db-object mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rose-db-object