4 use vars qw/$VERSION $AUTOLOAD/;
5 $VERSION = do { my @r=(q$Revision$=~/\d+/g); sprintf "%d."."%02d"x$#r,@r };
13 Top level class for OpenSRF perl modules.
17 # Exception base classes
19 # ( OpenSRFException => { fields => [ 'errno' ] });
20 #push @Exception::Class::ISA, 'Error';
24 Traps methods calls for methods that have not been defined so they
25 don't propogate up the class hierarchy.
30 my $type = ref($self) || $self;
32 my $otype = ref $self;
34 my ($package, $filename, $line) = caller;
35 my ($package1, $filename1, $line1) = caller(1);
36 my ($package2, $filename2, $line2) = caller(2);
37 my ($package3, $filename3, $line3) = caller(3);
38 my ($package4, $filename4, $line4) = caller(4);
39 my ($package5, $filename5, $line5) = caller(5);
40 $name =~ s/.*://; # strip fully-qualified portion
43 ** ${name}() isn't there. Please create me somewhere (like in $type)!
44 ** Error at $package ($filename), line $line
45 ** Call Stack (5 deep):
46 ** $package1 ($filename1), line $line1
47 ** $package2 ($filename2), line $line2
48 ** $package3 ($filename3), line $line3
49 ** $package4 ($filename4), line $line4
50 ** $package5 ($filename5), line $line5
51 ** Object type was $otype
58 =head3 alert_abstract()
60 This method is called by abstract methods to ensure that
61 the process dies when an undefined abstract method is called
64 sub alert_abstract() {
66 my $class = ref( $c ) || $c;
67 my ($file, $line, $method) = (caller(1))[1..3];
68 die " * Call to abstract method $method at $file, line $line";
71 sub class { return scalar(caller); }