1 package C4::Maintainance; #asummes C4/Maintainance
3 #package to deal with marking up output
10 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
12 # set the version for version checking
16 @EXPORT = qw(&listsubjects &updatesub);
17 %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
19 # your exported package globals go here,
20 # as well as any optionally exported functions
22 @EXPORT_OK = qw($Var1 %Hashit);
25 # non-exported package globals go here
26 use vars qw(@more $stuff);
28 # initalize package globals, first exported ones
34 # then the others (which are still accessible as $Some::Module::stuff)
38 # all file-scoped lexicals must be created before
39 # the functions below that use them.
41 # file-private lexicals go here
45 # here's a file-private function as a closure,
46 # callable as &$priv_func; it cannot be prototyped.
51 # make all your functions, whether exported or not;
54 my ($sub,$num,$offset)=@_;
56 my $query="Select * from bibliosubject where subject like '$sub%' group by subject";
58 $query.=" limit $offset,$num";
60 my $sth=$dbh->prepare($query);
65 while (my $data=$sth->fetchrow_hashref){
77 my $query="update bibliosubject set subject='$sub' where subject='$oldsub'";
78 my $sth=$dbh->prepare($query);
83 END { } # module clean-up code here (global destructor)