mirror of
				https://github.com/fspc/dswim.git
				synced 2025-10-31 08:25:35 -04:00 
			
		
		
		
	fixed a problem where put() was putting keys and values in random
places, using a normal hash fixed the probem and now --db works perfectly again. Seems to be a bug introduced with the newer berkely and DB_File since it wasn't a problem before. Solved.
This commit is contained in:
		
							parent
							
								
									764c7fc2cb
								
							
						
					
					
						commit
						ef8bc2c5a1
					
				
							
								
								
									
										15
									
								
								SWIM/DB.pm
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								SWIM/DB.pm
									
									
									
									
									
								
							| @ -876,12 +876,19 @@ sub db { | ||||
| 	  } # if defined         | ||||
| 	  else { | ||||
| 	      dbi(\%commands); | ||||
| 	      print "$_ $db{$package_name}\n"; | ||||
| 	      $zing->put($_,$db{$package_name});     | ||||
| 
 | ||||
| 	      #$zing->put($_,$db{$package_name});     | ||||
| 	      # wow, very weird .. used to work fine, but this did the trick :) | ||||
| 	      # otherwise the key and value were placed in random places  | ||||
| 	      # and never together | ||||
| 	      # inspired here - http://modperlbook.org/html/ch19_06.html | ||||
| 	      # in 19.6.2. Read/Write Access | ||||
| 
 | ||||
| 	      $ib{$_} = $db{$package_name}; | ||||
| 	  } | ||||
| 
 | ||||
|       untie %db; | ||||
|       untie $zing; | ||||
| 	  untie %db; | ||||
| 	  untie $zing; | ||||
| 
 | ||||
|       } # end while | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user