Gidday all,

I have written a module to be used with our CMS 'Teamsite'

I wonder if any of you Perl gurus can see any holes in this.

It has methods to return the following
1) branch path
2) branch name
3) workarea
4) local path
any help appreciated thank you
Colin

given the following file 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::SystemData;

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;




This E-Mail is intended only for the addressee. Its use is limited to that
intended by the author at the time and it is not to be distributed without the
author's consent. Unless otherwise stated, the State of Queensland accepts no
liability for the contents of this E-Mail except where subsequently confirmed in
writing. The opinions expressed in this E-Mail are those of the author and do
not necessarily represent the views of the State of Queensland. This E-Mail is
confidential and may be subject to a claim of legal privilege.

If you have received this E-Mail in error, please notify the author and delete this 
message immediately.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to