/[SWISH-PlusPlus]/trunk/PlusPlus.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/PlusPlus.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (hide annotations)
Fri Dec 3 13:31:43 2004 UTC (19 years, 3 months ago) by dpavlin
File size: 1738 byte(s)
initial import of first version created with h2xs -AXn SWISH::PlusPlus

1 dpavlin 1 package SWISH::PlusPlus;
2    
3     use 5.008004;
4     use strict;
5     use warnings;
6    
7     our $VERSION = '0.01';
8    
9     use Carp;
10    
11     =head1 NAME
12    
13     SWISH::PlusPlus - Perl extension SWISH++
14    
15     =head1 SYNOPSIS
16    
17     use SWISH::PlusPlus;
18     blah blah blah
19    
20     =head1 DESCRIPTION
21    
22     This is perl module to use SWISH++ indexer by Paul J. Lucas. SWISH++ is
23     rewrite of swish-e in C++ with blazingly fast performance, but without
24     support for properties (which this module tries to fix)
25    
26     =head1 METHODS
27    
28     =head2 open
29    
30     Create new indexing object.
31    
32     my $i = new SWISH::PlusPlus(
33     index => '/path/to/index',
34     );
35    
36     Options to open are following:
37    
38     =over 5
39    
40     =item C<index>
41    
42     path to directory in which index will be created.
43    
44     =back
45    
46     =cut
47    
48     sub new {
49     my $class = shift;
50     my $self = {@_};
51     bless($self, $class);
52    
53     foreach (qw(index)) {
54     croak "need $_" unless $self->{$_};
55     }
56    
57     if (! -e $self->{'index'}) {
58     mkdir $self->{'index'} || confess "can't create index ",$self->{'index'},": $!";
59     }
60    
61     $self ? return $self : return undef;
62     }
63    
64    
65     1;
66     __END__
67    
68     =head2 EXPORT
69    
70     None by default.
71    
72     =head1 SEE ALSO
73    
74     Mention other useful documentation such as the documentation of
75     related modules or operating system documentation (such as man pages
76     in UNIX), or any relevant external documentation such as RFCs or
77     standards.
78    
79     If you have a mailing list set up for your module, mention it here.
80    
81     If you have a web site set up for your module, mention it here.
82    
83     =head1 AUTHOR
84    
85     Dobrica Pavlinusic, E<lt>dpavlin@E<gt>
86    
87     =head1 COPYRIGHT AND LICENSE
88    
89     Copyright (C) 2004 by Dobrica Pavlinusic
90    
91     This library is free software; you can redistribute it and/or modify
92     it under the same terms as Perl itself, either Perl version 5.8.4 or,
93     at your option, any later version of Perl 5 you may have available.
94    
95    
96     =cut

  ViewVC Help
Powered by ViewVC 1.1.26