Miner.pm untested

filter: Statementstmt 0.0% 0 / 1 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 1 SCAR -
1 package FileMetadata::Miner;
2  
3 our $VERSION = '1.0';
4  
5 =head1 NAME
6  
7 FileMetadata::Miner
8  
9 =head1 SYNOPSIS
10  
11 An interface to be implemented by Miners in the FileMetadata framework
12  
13 =head1 DESCRIPTION
14  
15 Miners extract metadata from sources, usually specializing in a certain
16 type of resource (e.g HTML files). Meta data for resources can be extracted by
17 multiple miners executed in a series. One miner can extract information
18 regarding file statistics. Such a miner would be generic. A more specialized
19 miner can then be used to extract information on the author.
20  
21 Miners can be used outside the FileMetadata framework with ease and should be
22 implemented for such general use.
23  
24 =head1 METHODS
25  
26 =head2 new
27  
28 This constructor takes a single argument. The argument is a reference to a hash
29 that represents configuration information. The method returns a reference
30 to a new miner object. The specifics of the config hash should be available
31 in the documentation for the Miner.
32  
33 =head2 mine
34  
35 This method returns a boolean value. It is true on a success and false
36 on failure.
37  
38 This method takes two arguments:
39  
40 1. The URI to the resource for which metadata is to be compiled.
41  
42 URIs are prefixed by the protocol. If no protocol is present, it can be
43 assumed that the URI is an absolute path to a file.
44  
45 It is possible that the Miner refers to another resource to obtain
46 data on the given URI or for that matter to no resource at all.
47  
48 2. A reference to a hash that contains meta data known for the resource.
49  
50 Any meta data found should be inserted into the hash. The keys in the hash
51 should be prefixed by the name space of the module. For example the
52 FileMetadata::Miner::Stat would insert keys 'FileMetadata::Miner::Stat::atime'
53 with the corresponding value. All values in the hash should be strings.
54  
55 A miner should not alter or insert metadata not in its namespace.
56  
57 =head1 VERSION
58  
59 1.0 - This is the first release of this interface
60  
61 =head1 AUTHOR
62  
63 Midh Mulpuri midh@enjine.com
64  
65 =head1 LICENSE
66  
67 This software can be used under the terms of any Open Source Initiative
68 approved license. A list of these licenses are available at the OSI site -
69 http://www.opensource.org/licenses/
70  
71 =cut