GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Data::Stag::StagDB(3) User Contributed Perl Documentation Data::Stag::StagDB(3)

  Data::Stag::StagDB - persistent storage and retrieval of stag nodes

  # parsing a file into a file based index
  my $sdb = Data::Stag::StagDB->new;
  $sdb->unique_key("ss_details/social_security_no");
  $sdb->record_type("person");
  $sdb->indexfile("./person_by_ss-idx");
  Data::Stag->parse(-file=>$fn, -handler=>$sdb);
  my $obj = $sdb->index_hash;
  my $person = $obj->{'999-9999-9999'};
  print $person->xml;

  # indexing an existing stag tree into a file based index
  my $personset = Data::Stag->parse($fn);
  my $sdb = Data::Stag::StagDB->new;
  $sdb->unique_key("ss_details/social_security_no");
  $sdb->record_type("person");
  $sdb->indexfile("./person_by_ss-idx");
  $personset->sax($sdb);
  my $obj = $sdb->index_hash;
  my $person = $obj->{'999-9999-9999'};
  print $person->xml;

This module is an extension of Data::Stag::HashDB - you can use it in the same way.

It creates a simple file based database of stag nodes

This is useful if you want your data to persist; or if you want to use Data::Stag::HashDB but your data will not fit into memory

  Usage   -
  Returns -
  Args    -
2013-09-18 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.