xmltv/lib XMLTV.pm.in,1.162,1.163

Geoff <[email protected]>
Newsgroups gmane.comp.tv.xmltv.cvs
Message-ID <[email protected]>
Update of /cvsroot/xmltv/xmltv/lib
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30487

Modified Files:
	XMLTV.pm.in 
Log Message:
ensure consistent order of Dumper hash keys (for equality tests)

Index: XMLTV.pm.in
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/XMLTV.pm.in,v
retrieving revision 1.162
retrieving revision 1.163
diff -C2 -d -r1.162 -r1.163
*** XMLTV.pm.in	9 May 2014 04:07:13 -0000	1.162
--- XMLTV.pm.in	29 Aug 2014 07:51:50 -0000	1.163
***************
*** 547,552 ****
      my $my_cred_cb = sub( $ ) {
  	my $c = shift;
! 	if (defined $all_credits) {
! 	    if (Dumper($all_credits) ne Dumper($c)) {
  		warn "different files have different credits, picking one arbitrarily\n";
  		# In fact, we pick the last file in the list since this is the
--- 547,552 ----
      my $my_cred_cb = sub( $ ) {
  	my $c = shift;
! 	$Data::Dumper::Sortkeys = 1; # ensure consistent order of dumped hash
! 	if (defined $all_credits and Dumper($all_credits) ne Dumper($c)) {
  		warn "different files have different credits, picking one arbitrarily\n";
  		# In fact, we pick the last file in the list since this is the
***************
*** 564,567 ****
--- 564,568 ----
  	my $c = shift;
  	my $id = $c->{id};
+ 	$Data::Dumper::Sortkeys = 1; # ensure consistent order of dumped hash
  	if (defined $all_channels{$id} and Dumper($all_channels{$id}) ne Dumper($c)) {
  	    warn "differing channels with id $id, picking one arbitrarily\n";
***************
*** 963,966 ****
--- 964,968 ----
      
      $DIE_ON_MULTIPLE_ENCODINGS = ( defined $w_args->{UTF8} ? 0 : 1 );
+     $Data::Dumper::Sortkeys = 1; # ensure consistent order of dumped hash
      
      XMLTV::parsefiles_callback
***************
*** 1052,1055 ****
--- 1054,1059 ----
      my @all_progs;
      my $do_progs = shift;
+     
+     $Data::Dumper::Sortkeys = 1; # ensure consistent order of dumped hash
  
      foreach (@_) {


------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.