[carton] 215/472: Move dump JSON to Lock
Lucas Kanashiro
kanashiro-guest at moszumanska.debian.org
Fri Jul 24 00:38:48 UTC 2015
This is an automated email from the git hooks/post-receive script.
kanashiro-guest pushed a commit to branch master
in repository carton.
commit 24d96dc523e6368375c4296a3983886d5e0b55f2
Author: Tatsuhiko Miyagawa <miyagawa at bulknews.net>
Date: Thu May 30 22:13:36 2013 +0900
Move dump JSON to Lock
---
lib/Carton.pm | 2 +-
lib/Carton/Lock.pm | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/Carton.pm b/lib/Carton.pm
index ccdea79..cb696c5 100644
--- a/lib/Carton.pm
+++ b/lib/Carton.pm
@@ -167,7 +167,7 @@ sub update_lock_file {
my($self, $file) = @_;
my $lock = $self->build_lock;
- Carton::Util::dump_json($lock, $file);
+ Carton::Lock->new($lock)->write($file);
return 1;
}
diff --git a/lib/Carton/Lock.pm b/lib/Carton/Lock.pm
index c3c0af1..4eacf95 100644
--- a/lib/Carton/Lock.pm
+++ b/lib/Carton/Lock.pm
@@ -16,6 +16,11 @@ sub new {
bless $data, $class;
}
+sub write {
+ my($self, $file) = @_;
+ Carton::Util::dump_json({ %$self }, $file);
+}
+
sub modules {
values %{$_[0]->{modules} || {}};
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/carton.git
More information about the Pkg-perl-cvs-commits
mailing list