package Prefix;
use IO::File;
-use Carp;
use DXVars;
use DB_File;
use Data::Dumper;
-use Carp;
+use DXDebug;
use strict;
use vars qw($db %prefix_loc %pre);
$p = $parts[0];
shift @parts if $p =~ /^(WEB|NET)$/o;
$p = $parts[$#parts];
- pop @parts if $p =~ /^(\d+|[PABM]|AM|MM|BCN|SIX|WEB|NET|Q\w+)$/o;
+ pop @parts if $p =~ /^(\d+|[JPABM]|AM|MM|BCN|SIX|WEB|NET|Q\w+)$/o;
$p = $parts[$#parts];
- pop @parts if $p =~ /^(\d+|[PABM]|AM|MM|BCN|SIX|WEB|NET|Q\w+)$/o;
+ pop @parts if $p =~ /^(\d+|[JPABM]|AM|MM|BCN|SIX|WEB|NET|Q\w+)$/o;
# can we resolve them by direct lookup
foreach $p (@parts) {
$name =~ s/.*:://o;
confess "Non-existant field '$AUTOLOAD'" if !$valid{$name};
+ # this clever line of code creates a subroutine which takes over from autoload
+ # from OO Perl - Conway
+ *{$AUTOLOAD} = sub {@_ > 1 ? $_[0]->{$name} = $_[1] : $_[0]->{$name}} ;
if (@_) {
$self->{$name} = shift;
}