Changeset 3 in mp3-find for trunk/lib/MP3/Find.pm
- Timestamp:
- 01/30/06 02:05:25 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/MP3/Find.pm
r1 r3 37 37 =head1 SYNOPSIS 38 38 39 use MP3Find; 39 # select with backend you want 40 use MP3::Find qw(Filesystem); 40 41 41 42 print "$_\n" foreach find_mp3s( … … 59 60 or the actual Perl data structure representing the results. 60 61 62 There are currently two backends to this module: L<MP3::Find::Filesystem> 63 and L<MP3::Find::DB>. You choose which one you want by passing its 64 name as the argument to you C<use> statement; B<MP3::Find> will look for 65 a B<MP3::Find::$BACKEND> module. If no backend name is given, it will 66 default to using L<MP3::Find::Filesystem>. 67 68 B<Note:> I'm still working out some kinks in the DB backend, so it 69 is currently not as stable as the Filesystem backend. 70 61 71 =head1 REQUIRES 62 72 63 L<File::Find>, L<MP3::Info>, L<Scalar::Util> 73 L<File::Find>, L<MP3::Info>, and L<Scalar::Util> are needed for 74 the filesystem backend (L<MP3::Find::Filesystem>). 64 75 65 L<DBI> and L<DBD::SQLite> are needed if you want to have a66 database backend .76 L<DBI>, L<DBD::SQLite>, and L<SQL::Abstract> are needed for the 77 database backend (L<MP3::Find::DB>). 67 78 68 79 =head1 EXPORTS … … 95 106 =item C<exact_match> 96 107 97 Adds an implicit C<^> and C<$> around each query string. 108 Adds an implicit C<^> and C<$> around each query string. Does nothing 109 if the query is already a regular expression. 98 110 99 111 =item C<sort> … … 101 113 What field or fields to sort the results by. Can either be a single 102 114 scalar field name to sort by, or an arrayref of field names. Again, 103 acceptable field names are anything that L<MP3::Info> knows about. 115 acceptable field names are anything that L<MP3::Info> knows about; 116 field names will be converted to upper case as with the C<query> 117 option. 104 118 105 119 =item C<printf> … … 144 158 =back 145 159 160 =head1 BUGS 161 162 There are probably some in there; let me know if you find any (patches 163 welcome). 164 146 165 =head1 TODO 147 166 148 More of a structured query would be nice; currently everything 149 is and-ed together, and it would be nice to be able to put query 150 keys together with a mixture of and and or. 167 Better tests, using some actual sample mp3 files. 151 168 152 Searching a big directory is slo-o-ow! Investigate some sort of 153 caching of results? 154 155 The current sorting function is also probably quite inefficient. 169 Other backends (a caching filesystem backend, perhaps?) 156 170 157 171 =head1 SEE ALSO 172 173 L<MP3::Find::Filesystem>, L<MP3::Find::DB> 174 175 L<mp3find> is the command line frontend to this module (it 176 currently only uses the filesystem backend). 158 177 159 178 See L<MP3::Info> for more information about the fields you can
Note: See TracChangeset
for help on using the changeset viewer.