[Cgi-session-user] CGI::Session::Serialize::yaml
Brought to you by:
sherzodr
From: Tyler M. <ty...@yi...> - 2006-02-15 22:06:01
|
YAML is a notation that represents classes, objects, arrays, hashes, and scalars. Perl, PHP, Ruby, Python, and other languages can serialize to and =66rom YAML. I have written a very simple CGI::Session::Serialize class that serializes to/from YAML: http://search.cpan.org/~CRAKRJACK/CGI-Session-Serialize-yaml-1.0/lib/CGI/Se= ssion/Serialize/yaml.pm It uses the fast C-based YAML::Syck when available, or the pure-perl YAML.pm otherwise. Combining this serializer with, say, a MySQL or Postgres driver opens up the door for CGI::Session objects to be shared with other dynamic languages. I'm currently using this for a project that is going to have a mod_perl2 low-level authentication backend, but possibly some PHP pages in the actual webspace. I'd really like to see something like this make it into the main CGI::Session distribution. Working with multiple languages at once is becoming more and more common. I uploaded it to CPAN mainly because I'm going to be releasing a module that needs it soon; if a YAML serializer makes it into CGI::Session itself (a non-dev release), I'd remove mine from CPAN and update my module to depend on the latest CGI::Session. Thanks, Tyler |