When using Class::DBI with a table such as:
Table: preferences
+----+------------------+----------------------------+
| id | name | value |
+----+------------------+----------------------------+
| 0 | filename | /path/to/file.txt |
| 1 | item_enabled | 1 |
| 2 | task_name | something |
+----+------------------+----------------------------+
you want to use:
print DB::Prefs->filename,$/;
DB::Prefs->filename("/new/path/to/file");
instead of:
my $row=DB::Prefs->search({ name => "filename" })->first;
print $row->value,$/;
$row->value("/new/path/to/file");
|