Burak Gürsoy wrote:
> 
> Can anyone explain this? is this a bug or feature?
>

what were you expecting>

> #!/usr/bin/perl -w
> use strict;
> package Test::One;
> 
> sub new {
>    my $class = shift;
>    my $self  = {};
>    bless $self, $class;
>    return $self;
> }
> 
> package Test::Two;
> 
> sub new {
>    my $class   = shift;
>    my $test_it = shift;
 
#    $text_it == $test_one

>    my $self    = $test_it;

#    $self == $test_one

>    bless $self, $class;

# $test_one now object of Test::Two

>    return $self;
> }
> 
> package main;
> 
> my $test_one = Test::One->new();
> print "[Before] ref(\$test_one) = ",ref($test_one),"\n";
> 
> my $test_two = Test::Two->new($test_one);
> print "[After ] ref(\$test_one) = ",ref($test_one),"\n";

does what I would expect...

-- 
Alan F. Dickey - Interaction and Realization
http://www.intac.com/~afdickey
mailto:[EMAIL PROTECTED]
VOX: 908-273-3232 Cell: 908-334-0932

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to