TM::Materialized::JTM(3pm) User Contributed Perl Documentation TM::Materialized::JTM(3pm)NAME
TM::Materialized::JTM - Topic Maps, trait for JSON Topic Map instances.
SYNOPSIS
use TM::Materialized::JTM;
my $tm=TM::Materialized::JTM(file=>"somefile.jtm");
$tm->sync_in;
...
# map was modified, now save the changes
$tm->sync_out;
DESCRIPTION
This package provides map parsing and creating functionality for JTM (JSON Topic Map) instances. The JSON Topic Map format is defined
here: <http://www.cerny-online.com/jtm/1.0/>.
INTERFACE
Methods
Constructor
$tm = TM::Materialized::JTM->new (...);
The constructor expects a hash as described in TM::Materialized::Stream, with one additional key/value parameter:
o format (choices: "json", "yaml")
This option controls whether the JTM data is treated as being in JSON format or in YAML (which is a superset of JSON). This applies
to both reading and writing of map data.
The default value is "json".
format
$tm->format('json');
$curformat=$tm->format;
This method gets or sets the format parameter for future operations. Possible choices: "json", "yaml".
SEE ALSO
TM::Serializable::JTM
AUTHOR INFORMATION
Copyright 2010, Alexander Zangerl, All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://www.perl.com/perl/misc/Artistic.html
perl v5.10.1 2010-07-18 TM::Materialized::JTM(3pm)
Check Out this Related Man Page
TM::ResourceAble::MLDBM(3pm) User Contributed Perl Documentation TM::ResourceAble::MLDBM(3pm)NAME
TM::ResourceAble::MLDBM - Topic Maps, DBM Storage (synchronous)
SYNOPSIS
use TM::ResourceAble::MLDBM;
{
my $tm = new TM::ResourceAble::MLDBM (file => '/tmp/map.dbm');
# modify the map here.....
} # it goes out of scope here, and all changes are written back automagically
# later in the game
{
my $tm = new TM::ResourceAble::MLDBM (file => '/tmp/map.dbm');
# we are back in business, no sync necessary
}
DESCRIPTION
This package just implements TM with a BerkeleyDB store. Unlike TM::Materialized::MLDBM this module does not need explicit synchronisation
with the external resource (the DBM file here). It ties content-wise with the DBM file at constructor time and unties at DESTROY time.
This implementation technique is not so memory-efficient as I had thought. Whenever an assertion or a toplet is referenced, the whole block
of toplets, resp. assertions, is loaded from the DB database. For small maps this is really fast, but it can become a drag for larger
maps. See TM::ResourceAble::BDB for a more efficient solution.
NOTE: Be careful to use this together with TM::Index::*. The indices will be held as part of the map, and so will be stored along side. If
you heavily use the map, this can result in many swapin/swapouts. Better to look at TM::IndexAble for that matter.
INTERFACE
Constructor
The constructor expects a hash with the following keys:
file (no default)
This contains the file name of the DBM file to tie to.
SEE ALSO
TM, TM::Materialized::MLDBM
AUTHOR INFORMATION
Copyright 200[68], Robert Barta <drrho@cpan.org>, All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://www.perl.com/perl/misc/Artistic.html
perl v5.10.1 2010-07-18 TM::ResourceAble::MLDBM(3pm)
to keep these forums a viable resource i understand that we must keep the 'chatter' to a minimum when answering or helping others, so how about an 'off topic' section where we can talk about anything? i can see though that this would entail more work for Neo to set it up, so maybe this is a bad... (3 Replies)
Wowee, step off the bandwagon for a few months and it's amazing what can change. I'm still not sure if this is, in fact, but if it is, what made Neo change his mind about an OT thread? (7 Replies)
Hi, I am practicing a very simple perl programming, what i want to do is reverse the string
what is wrong with the following
Thanks
$string = "abcdef";
@array = split(//, $string);
$length =length @array
for ( i=1;i< $length+1;i++)
{
print "$_\n";
} (5 Replies)
Hi All ,
Below is the perl code. from below code want to confirm one thing that
wahtever the sequence of data we are passing through json format which contains 3 tuples of different sequences
Eg:
ParentID,SystemID,SendingTime,Time,ClientLocation,ClientID,
... (1 Reply)
Hi All
I have used the below code to print the dumper of a json
#!/usr/bin/perl
use LWP::Simple;
use JSON qw( decode_json );
use Data::Dumper;
use strict;
use warnings;
my (%list);
my $trendsurl =... (5 Replies)
Hello,
I would like to modify an existing script of mine that uses a manually defined "MCVERSION" variable and make it define that variable instead based on this JSON file stored online:
https://s3.amazonaws.com/Minecraft.Download/versions/versions.json
Within that JSON, I 'm looking for... (4 Replies)
Hi Gurus,
I have below JSON file, now I want to rewrite this file into a new file.
I will appreciate if anyone can help me to provide the solution...I can't use jq.
{
"_id": "3ad893cb4cf1560add7b4caffd4b6126",
"_rev": "1-1f0ce165e1d210319cf6e9f9c6ff654f",
"name":... (4 Replies)
Dear friends,
I'm getting below API result and i would like to format them with Shell scripting.
Input
"id": 9,
"description": "short desc",
"name": "test",
"name_with_namespace": "ABCD-PDFF-PLATFORM-TEST-V1 / test",
"path": "test",
"path_with_namespace":... (7 Replies)
Hello guys,
I want to parse a JSON file in order to get the data in a table form.
My JSON file is like this:
{
"document":{
"page":
},
{
"column":
}
]
},
{
... (6 Replies)