-
-
18 Dec 2017 18:21:52 UTC
- Distribution: Struct-Diff-MergePatch
- Module version: 0.01
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues
- Testers (1014 / 0 / 0)
- Kwalitee
Bus factor: 0- 100.00% Coverage
- License: perl_5
- Perl: v5.6.0
- Activity
24 month- Tools
- Download (4.7KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
++ed by:1 non-PAUSE user- Dependencies
- Struct::Diff
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Struct::Diff::MergePatch - JSON Merge Patch (rfc7396) for perl structures
VERSION
Version 0.01
SYNOPSIS
use Struct::Diff::MergePatch qw(diff patch); $old = {a => {b => 1,c => [0], d => 5},f => 2}; $new = {a => {b => 1,c => [0,1],e => 6},f => 2}; $diff = diff($old, $new); # {a => {c => [0,1],d => undef,e => 6}} patch($old, $diff); # $old now equal to $new
EXPORT
Nothing is exported by default.
SUBROUTINES
diff
Calculate patch for two arguments:
$patch = diff($old, $new);
Convert Struct::Diff diff to merge patch when single arg passed:
$patch = diff(Struct::Diff::diff($old, $new));
patch
Apply patch.
patch($target, $patch);
AUTHOR
Michael Samoglyadov,
<mixas at cpan.org>
BUGS
Please report any bugs or feature requests to
bug-struct-diff-mergepatch at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Struct-Diff-MergePatch. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Struct::Diff::MergePatch
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Struct-Diff-MergePatch
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
SEE ALSO
Struct::Diff, JSON::MergePatch, rfc7396
LICENSE AND COPYRIGHT
Copyright 2017 Michael Samoglyadov.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
Module Install Instructions
To install Struct::Diff::MergePatch, copy and paste the appropriate command in to your terminal.
cpanm Struct::Diff::MergePatch
perl -MCPAN -e shell install Struct::Diff::MergePatch
For more information on module installation, please visit the detailed CPAN module installation guide.