Hi John, you certainly have given this module more thought than I did, you've given me something to think about.
Thank you. Colin -----Original Message----- From: perl.org [mailto:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 1:27 AM To: [EMAIL PROTECTED] Subject: Re: First module Hooray! Finally evidence of another TeamSite victim on this list! This module really seems like something the vendor should provide. My version is attached, which sits on some other modules you may be interested in. I subclass as CMSFile for behaviors (this one is pretty much read-only). I am not a Perl expert and this code is untested, undocumented and unsupported on any platform - anyone willing to provide feedback on the code is welcome. I'm not a fan of Perldoc so I am pasting docs from Word (not a fan of that either, but...). Docs may not be 100% accurate. It would be great if we could get something like this on devnet, transition ownership to Interwoven, etc. IWAPI/CMSFSE.pm This lightweight class represents objects on the Interwoven File System such as branches, areas, directories and files, providing path normalization, componentization and other relevant properties and methods. Hopefully this will at least provide some ideas. -John On Wed, 15 Sep 2004 10:22:36 +1000, Johnstone, Colin <[EMAIL PROTECTED]> wrote: > 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>