[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] Perl spørgsmål



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 10 Dec 2007 08:51:58 +0000
Peter Makholm <sslug@sslug> wrote:

> 
> En variabel defineret i modulescope er global for alle objekter af
> klassen. Så hvis du skal kunen bruge flere samtidige instanser af
> samme klasse med forskellige værdier, så er en variabel i modulscope
> et stort no-go.
> 
Det giver god mening. Nu skal mit nuværende projekt ikke afvikles som
flere instanser, men da det er et modul, kan man jo ikke vide, hvad
fremtiden bringer, så jeg sørger for at globale variable initialiseret
i objekt scope.

> 
> DB_File eksporterer ifølge dokumentationen en hashref der hedder
> $DB_BTREE. Du sætter en nøgle i en hash der hedder %DB_BTREE. I
> eksemplerne står der også tydeligt:
> 
>   $DB_BTREE->{'compare'} = \&compare;
> 
Ups, skrivefejl, jeg gør også som ovenstående. Det gør stadigvæk ingen
forskel:-\ Nogen bud på en løsning?

> DB_File har i øvrigt et gysligt interaface. Her du overevejet at bruge
> BerkeleyDB istedet. Det er noget bedre og giver dig mulighed for at
> definere en sammenligningsfunktion når du kalder tie og ikek som
> global tilstandsvariabel.
> 
Det skal anvendes i et embedded system, hvilket begrænser mulighederne
væsentligt. Der er tre umiddelbare grunde:
1) DB_File findes som standard på systemet
2) BerkeleyDB findes ikke som standard
3) Jeg har ikke behov for andet, end hvad DB_File tilbyder - Mulighed
for tie samt simpel låsning på filniveau.

Herudover er persistensbehovet begrænset til max 150 tekstlinjer per
post, og maksimalt ca. 100 poster. En standard konfiguration vil højest
skulle gemme ~5000 tekstlinjer.

- -- 
Hilsen/Regards
Michael Rasmussen
http://keyserver.veridis.com:11371/pks/lookup?op=get&search=0xE3E80917
A computer is like air conditioning: it becomes useless when you open
windows.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHXYG9VErYVePoCRcRAvTvAJ9K0zueREexSqq/LhSDHnqXKREttwCfchgA
To5n32I7awiHE9jNqQh5nrw=
=FFPJ
-----END PGP SIGNATURE-----


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2008-01-01, 17:38 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *