PDA

View Full Version : DataStores Base class & compile time abstract classenforcement.



Dan Sully
2005-07-21, 19:04
Here's a patch that moves all the %fieldInfo data into
Slim::DataStores::Base, and turns on compile time enforcement of required
class methods for a DataStore.

If your DataStore doesn't implement a required method, it will fail like so:

Class Slim::DataStores::DBI::DBIStore must define foo for class
Slim::DataStores::Base at /home/daniel/dev/slim/trunk/Slim/Music/Info.pm line 19

-D
--
<iNoah> kernel's original recipe: 11 secret args and switches

Dan Sully
2005-07-21, 19:05
* Dan Sully shaped the electrons to say...

>Here's a patch that moves all the %fieldInfo data into
>Slim::DataStores::Base, and turns on compile time enforcement of required
>class methods for a DataStore.
>
>If your DataStore doesn't implement a required method, it will fail like so:
>
>Class Slim::DataStores::DBI::DBIStore must define foo for class
>Slim::DataStores::Base at /home/daniel/dev/slim/trunk/Slim/Music/Info.pm
>line 19

'twould help if it was attached..

-D
--
<iNoah> kernel's original recipe: 11 secret args and switches