[Dbix-class] ASE.pm uninitialized value warning
koxon
nicolas.menciere at ms.com
Wed Aug 10 07:47:31 GMT 2011
Hello,
After making my code works (see: “SQL Query generation issue” post), I
encountered a little issue but a noisy one.
For each update I do in my table, I have this warning:
*Use of uninitialized value in exists at
[...]/DBIx-Class/0.08127/lib/perl5/DBIx/Class/Storage/DBI/Sybase/ASE.pm line
266.*
It works well for INSERT or SELECT queries.
Here is a generated request that makes ASE.pm bark (any update request does
so far):
*UPDATE pims_inventory SET Modified = ?, RAG_Status = ?,
TO_Outage_Notification_Groups = ?, Version = ? WHERE ( ID = ? ): '2011-08-09
02:39:48', 'Green', 'itsec-lev1; itsec-lev2; ', '9', '2389'*
Here is the ResultSet file for my table:
*package SecDSG::PIMS::Schema::Result::PimsInventory;
use base qw/DBIx::Class::Core/;
my @table_columns = qw/
Hostname RAG_Status Comments_Notes Hardware Date_for_Next_Status
Serial_Number Site City Country Region Purchase_Price
Purchase_Date Device_Function Category Products_Services Plant_Type
Year_Depreciated TO_Outage_Notification_Groups Floor Room Cabinet
Secured_Room Alias Division PO_Number MCM_Number Status Sysloc
Next_Status DOCS_URL Base_OS OS_Version OS_Name LinkTitle
VALUE Local_IT_Contact GRN ownership Editor Modified
/;
__PACKAGE__->table('pims_inventory');
__PACKAGE__->add_columns(@table_columns);
# ID Column gets special treatment in order to ensure
# TEXT to INTEGER conversion
__PACKAGE__->add_columns(
'ID' => {'data_type' => 'INTEGER'},
'Version' => {'data_type' => 'INTEGER'},
'VALUE' => {'data_type' => 'INTEGER'},
'Year_Depreciated' => {'data_type' => 'INTEGER'},
'Date_Order_Placed' => {'data_type' => 'smalldatetime'},
'Date_Equip_Recieved' => {'data_type' => 'smalldatetime'},
'Date_Deployed' => {'data_type' => 'smalldatetime'},
'Date_Production' => {'data_type' => 'smalldatetime'},
);
__PACKAGE__->set_primary_key('ID');
1;
*
The packages versions I am using:
*
'DBI' => '1.616',
'DBD-Sybase' => '1.11-oc15.5.0.07',
'DBIx-Class-Schema-Loader' => '0.07001',
'DBIx-Class' => '0.08127',
'syb/sgp' => '1.0',
'SQL-Abstract' => '1.72',
'SQL-Abstract-Limit' => '0.141',*
This is how I execute my update:
* my $delta = shift; # Hash reference containing only the fields to
update
# Dumper output of the HASH
# VAR1 = {
# 'Version' => '11',
# 'RAG_Status' => 'Green',
# 'Modified' => '2011-08-09 02:54:42',
# 'TO_Outage_Notification_Groups' => 'itsec-lev1; itsec-lev2; '
# };
my $schema = $self->{'schema'};
eval {
my $update_rs = $schema->resultset($source)->search_rs({'ID' =>
$id});
$update_rs->update($delta);
};
*
I took a pick at the ASE.pm module but I have to time to investigate the
issue origin.
Hopefully you could help me fix this.
Thanks !
--
View this message in context: http://dbix-class.35028.n2.nabble.com/ASE-pm-uninitialized-value-warning-tp6671385p6671385.html
Sent from the DBIx-Class mailing list archive at Nabble.com.
More information about the DBIx-Class
mailing list