Gidday all,
I would like to write a module to be used by either my presentation templates or ipls that has methods that return
1) branch path
2) branch name
3) workarea
4) local path
from a dcr path
this is what I have written so far can any of you perl gurus see any holes in this
given the following path for example
/.iwmnt/default/main/det/oli-intranet.admin.tafe/WORKAREA/work/templatedata/Navigation/PrimaryMenu/data/primarymenu
#!/web/teamsite/iw-home/iw-perl/bin/iwperl
package detir:

ystemData;
sub new
{
my ($proto, $dcrPath) =
@_;
my $class = ref($proto) || $proto;
my $self = {};
( $self->{BR_PATH},
$self->{BR_NAME},
$self->{WA_NAME},
$self->{L_PATH}) = $self->getParts($dcrPath);
bless $self, $class;
return $self;
}
sub getParts
{
my ( $self, $dcrPath ) =
@_;
$dcrPath =~ s!(^.*)/(.*)/WORKAREA/(.*?)/(.*$)!!;
return ($1, $2, $3, $4);
}
sub getBranchPath
{
my ( $self ) =
@_;
return $self->{BR_PATH};
}
sub getBranchName{
my ( $self ) =
@_;
return $self->{BR_NAME};
}
sub getWorkareaName{
my ( $self ) =
@_;
return $self->{WA_NAME};
}
sub getLocalPath{
my ( $self ) =
@_;
return $self->{L_PATH};
}
return 1;