| Revision: | 1.1 |
| Committed: | Sun Jan 20 04:24:00 2002 UTC (24 years, 8 months ago) by root |
| Content type: | application/x-troff |
| Branch: | MAIN |
| CVS Tags: | rel-1_1, rel-1_11, rel-1_04, rel-1_12, HEAD |
| Log Message: | *** empty log message *** |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | root | 1.1 | BEGIN { $| = 1; print "1..4\n"; } |
| 2 | |||
| 3 | use Convert::Scalar ':refcnt'; | ||
| 4 | |||
| 5 | no bytes; | ||
| 6 | |||
| 7 | my $x = 5; | ||
| 8 | |||
| 9 | print refcnt($x) == 1 ? "" : "not ", "ok 1\n"; | ||
| 10 | print refcnt($x,2) == 1 ? "" : "not ", "ok 2\n"; | ||
| 11 | refcnt_inc_rv \$x; | ||
| 12 | print refcnt_rv(\$x,2) == 4 ? "" : "not ", "ok 3\n"; | ||
| 13 | refcnt_inc $x; | ||
| 14 | refcnt_inc_rv \$x; | ||
| 15 | refcnt_dec $x; | ||
| 16 | print refcnt($x) == 2 ? "" : "not ", "ok 4\n"; | ||
| 17 | refcnt_dec $x; |