Permalink
Commits on May 30, 2013
  1. And it rises like a phoenix from the ashes

    The whole support for changing the object after construction could
    never work well, and was broken as noted in 28fde2f, 3893f08 and issue
    #6.
    
    So just remove support for it, and adjust the tests and the docs a
    lot. This is basically a whole rewrite of the docs to take into
    account how the API has changed since we initially wrote the module.
    avar committed May 30, 2013
  2. Add tests to show that the things we advertise as rw aren't actually rw

    Since 1.09 when we've had the magical pluggable formats we've been
    failing horribly on cases where we did the right thing before,
    i.e. when we change the input/output format at runtime.
    
    I did a limited patch to solve the latter in the last commit, but we
    still do completely the wrong thing with input formats. If you change
    $flex->detect_*(Bool) it's just silently ignored.
    
    Arguably we should just not support any rw operations at all. It makes
    the implementation much more painful, but we shouldn't advertise that
    it works and then completely fail on it.
    
    So add failing tests to show that changing it at runtime completely
    fails, we can then decide how to proceed with this. I.e. whether to
    fix this up or to remove support for dynamically changing the output
    format.
    avar committed May 30, 2013
  3. Fix regression in 1.09? that broke support for dynamically changing t…

    …he output format
    
    Adjust the test that I added in efc7d5e to indicate that changing
    ->output_format() on runtime no longer works.
    
    I added support for this in efc7d5e, but it's been broken recently
    with the patches that add the ability to add custom serializers. This
    makes it much harder to do experiments with different output formats,
    i.e. you have to construct two different serializers.
    
    This resolves issue #5: #5
    avar committed May 30, 2013
Commits on Feb 13, 2013
  1. Version bumpped and changelog

    joalves committed Feb 13, 2013
  2. Merge pull request #3 from joalves/master

    Added docs and tests to the custom format feature and refactored a bit the class attributes
    committed Feb 13, 2013
  3. Updated the dependencies

    joalves committed Feb 13, 2013
  4. Added docs and tests to the custom format feature and refactored a bi…

    …t the class attributes
    joalves committed Feb 13, 2013
Commits on Feb 11, 2013
  1. Going back to use code refs instead of strings for the serializers.

    I thought strings instead of code refs would give us a performance
    boost, but it happens that it is completely negligible and I don't
    like the idea of expecting code strings from subclasses or users
    of the module. With code refs errors are caught on compile time.
    
    Benchmark between the 2 versions:
    
        $ perl -Ilib benchmark.pl
        * object construction
                  Rate  string coderef
        string  1936/s      --     -3%
        coderef 1998/s      3%      --
        * deserialize empty hash
                    Rate coderef  string
        coderef 340787/s      --     -7%
        string  368223/s      8%      --
        * deserialize huge event
                  Rate coderef  string
        coderef 8587/s      --     -1%
        string  8654/s      1%      --
        * serialize empty hash
                    Rate coderef  string
        coderef 333041/s      --     -6%
        string  356013/s      7%      --
        * serialize huge event
                   Rate  string coderef
        string  19634/s      --     -1%
        coderef 19829/s      1%      --
    
    There's a very small impact with very small datastructers
    (empty string in this example), but almost no difference with
    bigger ones.
    joalves committed Feb 11, 2013
  2. Fix company name

    committed Feb 11, 2013
  3. Skip Singleton stuff

    committed Feb 11, 2013
Commits on Feb 10, 2013
  1. Fixed a typo

    joalves committed Feb 10, 2013
Commits on Nov 6, 2012
  1. Rename the $do_uncompress variable to $assume_compression

    I found it irksome that it was the only thing that didn't have the
    same name as the option.
    avar committed Nov 6, 2012
Commits on Nov 5, 2012
  1. Bump the version to 1.08

    avar committed Nov 5, 2012
  2. Support calling ->output_format('sereal') on existing objects

    Dynamically changing the output_format without a custom serial_encoder
    didn't work if the output format was set to 'sereal'.
    
    Now we'll dynamically construct a Sereal::Encoder object if needed if
    the output format changes from e.g. Storable to Sereal.
    avar committed Nov 5, 2012
Commits on Nov 2, 2012
  1. Add support for Sereal as an input/output format

    Add support for Sereal as an input/output format. We now have a hard
    dependency on because it's awesome and you should use it instead of
    using JSON.
    
    The addition of Sereal support in the "serialize" subroutine mostly
    involved copy/paste, the only original piece of code there is:
    
      if ($sereal_decoder_object->looks_like_sereal($uncompr)) {
        print STDERR "FlexSerializer: Detected that the input was Sereal\n" if DEBUG;
        print STDERR "FlexSerializer: This was the Sereal input: '%s'\n",
              substr($uncompr, 0, min(length($uncompr), 100)) if DEBUG >= 2;
        my $structure;
        $sereal_decoder_object->decode($uncompr, $structure);
        push @out, $structure;
      }
    
    The rest is just copy/pasting to deal with us now needing to detect
    some combination of Storable, JSON and Sereal. This patch is best
    viewed with "git show -w" to make that easier to read.
    
    Also do a major update to the documentation, with some changes to
    SYNOPSIS that could have been split up into another patch, but it was
    easier to make the change this way.
    
    This also adds exhaustive testing for the new format, the only caveat
    is that we're skipping some tests because under Sereal the serialized
    string may not be the same, but the result will be, so we have these
    TODO tests:
    
        $ perl -Ilib t/10basic.t | grep -C3 TODO | grep -a srl
        #          got: '=srl(*cbazCcfoocbar'
        #     expected: '=srlRcbazCcfoocbar'
        #          got: '=srl(*cbazCcfoocbar'
        #     expected: '=srlRcbazCcfoocbar'
    
    They still deserialize to the same objects though, so this should be
    OK. It might be hash ordering differences or the caveat that Serial
    might choose to use the PV slot of an IV/PV where JSON/Storable will
    pick both or the IV.
    avar committed Nov 2, 2012
  2. Revert "Change warn()'s to print STDERR's"

    This reverts commit 2b44ad5c0bc4cb094decb7f16bc48f9ed7511133.
    
    Actually it's better just to leave this as a warn() so someone can
    catch that if they want.
    avar committed Nov 2, 2012
  3. Change warn()'s to print STDERR's

    By doing a print to STDERR we're not going to run afoul of code that
    sets up a $SIG{__WARN__} handler and expects any warning to be a
    naughty condition.
    avar committed Nov 1, 2012
  4. Revert "Check status when closing $fh on file (de)serialization"

    This reverts commit babf793.
    
    Checking the return value of close() is completely redundant when
    we're using the autodie pragma.
    avar committed Nov 2, 2012
Commits on Jun 12, 2012
  1. Docs for detect_storable

    committed Jun 12, 2012
Commits on May 10, 2012
  1. Caio is a co-author

    committed May 10, 2012
Commits on May 9, 2012
  1. Version bump to 1.05

    caio committed May 9, 2012
Commits on May 3, 2012
  1. Fix the _fd <=> _fh mixup

    I have this bad habit of using both interchangeably.
    caio committed May 3, 2012
Commits on Feb 21, 2012
  1. version bump, change log

    committed Feb 21, 2012