CDB_File 0.97

8.9/10 (43 أصوات )

الترجمة الالية للوصف

  • مرات التنزيل: 144
  • متطلبات التشغيل:
  • الحجم:
  • الترخيص:
  • الاصدار : 0.97
  • اضيف في: 0000-00-00 00:00:00
  • اخر تحديث: 29/05/2012
  • الموقع علي الانترنت:

استخدام البرامج التي تم تنزيلها من موقعنا يجب أن يكون وفقاً للقوانين في بلدك.لا نوصي باستخدام برامج تنتهك القوانين في بلدك.،اذا كنت تري ان هذا المحتوي لا يتوافق مع حقوق الملكية الفكرية برجاء ابلاغنا بالضغط هنا


CDB_File is a Perl module which provides a Perl interface to Dan Berstein's cdb package: cdb is a fast, reliable, lightweight package for creating and reading constant databases.Reading from a cdbAfter the tie shown above, accesses to %h will refer to the cdb file file.cdb, as described in "tie" in perlfunc.Low level access to the database is provided by the three methods handle, datapos, and datalen. To use them, you must remember the CDB_File object returned by the tie call: $c in the example above. The datapos and datalen methods return the file offset position and length respectively of the most recently visited key (for example, via exists).Beware that if you create an extra reference to the CDB_File object (like $c in the example above) you must destroy it (with undef) before calling untie on the hash. This ensures that the object's DESTROY method is called. Note that perl -w will check this for you; see perltie for further details.Creating a cdbA cdb file is created in three steps. First call new CDB_File ($final, $tmp), where $final is the name of the database to be created, and $tmp is the name of a temporary file which can be atomically renamed to $final. Secondly, call the insert method once for each (key, value) pair. Finally, call the finish method to complete the creation and renaming of the cdb file.Alternatively, call the insert() method with multiple key/value pairs. This can be significantly faster because there is less crossing over the bridge from perl to C code. One simple way to do this is to pass in an entire hash, as in: $cdbmaker->insert(%hash);.A simpler interface to cdb file creation is provided by CDB_File::create %t, $final, $tmp. This creates a cdb file named $final containing the contents of %t. As before, $tmp must name a temporary file which can be atomically renamed to $final. CDB_File::create may be imported.SYNOPSIS use CDB_File; $c = tie %h, 'CDB_File', 'file.cdb' or die "tie failed: $!\n"; $fh = $c->handle; sysseek $fh, $c->datapos, 0 or die ...; sysread $fh, $x, $c->datalen; undef $c; untie %h; $t = new CDB_File ('t.cdb', "t.$$") or die ...; $t->insert('key', 'value'); $t->finish; CDB_File::create %t, $file, "$file.$$";or use CDB_File 'create'; create %t, $file, "$file.$$";Product's homepage Requirements:

· Perl only provide legal software, please help us keeping pur site legal, if you think this page is violating copyrights please let us know by clicking here Here

التعليقات علي CDB_File 0.97
اضافة تعليق

تعليقات الفيسبوك

تعليقات الموقع