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