dbd-pg

should I commit in the following code?

最后都变了- 提交于 2019-12-14 04:16:45
问题 My code: 122 # 123 my $hfpDbh = undef; 124 unless ( 125 $hfpDbh = DBI->connect("dbi:Pg:host=....")#removed something 128 ) { 129 Log( ERROR, "" ); 130 Exit( 1 ) 131 } 132 $hfpDbh->{RaiseError} = 1; 133 $hfpDbh->{AutoCommit} = 0; 134 135 ( my $mydata, $msg ) = load_data( $hfpDbh, $DatFile ); 136 unless ( defined($mydata) ) 137 { 138 Log(INFO, "Calling exit...2"); 139 } 140 #$hfpDbh->disconnect(); 141 Exit( 0 ); 142 Log(INFO, "Calling exit...4"); 143 144 145 sub load_data 146 { 147 my ( $dbh,

should I commit in the following code?

丶灬走出姿态 提交于 2019-12-04 21:39:01
My code: 122 # 123 my $hfpDbh = undef; 124 unless ( 125 $hfpDbh = DBI->connect("dbi:Pg:host=....")#removed something 128 ) { 129 Log( ERROR, "" ); 130 Exit( 1 ) 131 } 132 $hfpDbh->{RaiseError} = 1; 133 $hfpDbh->{AutoCommit} = 0; 134 135 ( my $mydata, $msg ) = load_data( $hfpDbh, $DatFile ); 136 unless ( defined($mydata) ) 137 { 138 Log(INFO, "Calling exit...2"); 139 } 140 #$hfpDbh->disconnect(); 141 Exit( 0 ); 142 Log(INFO, "Calling exit...4"); 143 144 145 sub load_data 146 { 147 my ( $dbh, $DatFile ) = @_; 148 my $msg = ''; 149 unless ( $dbh ) { 150 $msg = 'cannot load data, no DB handle';