cons-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Message Passing and Object-oriented Persistence... via Cons!


From: Terrence_Brannon
Subject: Message Passing and Object-oriented Persistence... via Cons!
Date: Fri, 13 Oct 2000 10:38:29 -0400

This is probably not the intended use of Cons, but since it automatically
exports Perl scalars to-and-from build scripts, this can serve as a means of
shutting Perl data between Perl processes...
ie, persistence and serialization without effort.

Here is my simple example:

# This is a Cons "Construct" file. It exports a scalar
# named po, which is received by the perl program
# tmp/Conscript
$po = { 1, 'two', 'buckle my', 'shoo' };
Export qw (po);
Build  qw (tmp/Conscript);


# This is the tmp/Conscript. I receive serialized data and
# process it, in this case, simply printing it to STDERR
Import qw( po ) ;
use Data::Dumper;
warn Data::Dumper->Dump([$po],['po']);


Output of run is
$po = {
        1 => 'two',
        'buckle my' => 'shoo'
      };





reply via email to

[Prev in Thread] Current Thread [Next in Thread]