On 9/14/2004 8:22 PM, Johnstone, Colin 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);

Does the above call actualy work? At this point $self is just a reference to a hash. You need to bless it before you can call methods on it.


bless $self, $class;

return $self;
}


--
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