1Package::Reaper(3)    User Contributed Perl Documentation   Package::Reaper(3)
2
3
4

NAME

6       Package::Reaper - pseudo-garbage-collection for packages
7

VERSION

9       version 0.100
10
11        $Id: /my/cs/projects/pkg-gen/trunk/lib/Package/Generator.pm 4470 2006-04-15T16:52:21.725214Z rjbs  $
12

SYNOPSIS

14           use Package::Generator;
15           use Package::Reaper;
16
17           {
18             my $package = Package::Generator->new_package;
19             my $reaper  = Package::Reaper->new($package);
20             ...
21           }
22
23           # at this point, $package stash has been deleted
24

DESCRIPTION

26       This module allows you to create simple objects which, when destroyed,
27       delete a given package.  This lets you approximate lexically scoped
28       packages.
29

INTERFACE

31       new
32
33         my $reaper = Package::Reaper->new($package);
34
35       This returns the newly generated package reaper.  When the reaper goes
36       out of scope and is garbage collected, it will delete the symbol table
37       entry for the package.
38
39       package
40
41         my $package = $reaper->package;
42
43       This method returns the package which will be reaped.
44
45       is_armed
46
47         if ($reaper->is_armed) { ... }
48
49       This method returns true if the reaper is armed and false otherwise.
50       Reapers always start out armed.  A disarmed reaper will not actually
51       reap when destroyed.
52
53       disarm
54
55         $reaper->disarm;
56
57       This method disarms the reaper, so that it will not reap the package
58       when it is destoryed.
59
60       arm
61
62         $reaper->arm;
63
64       This method arms the reaper, so that it will reap its package when it
65       is destroyed.  By default, new reapers are armed.
66

AUTHOR

68       Ricardo SIGNES, "<rjbs@cpan.org>"
69

BUGS

71       Please report any bugs or feature requests to "bug-package-genera‐
72       tor@rt.cpan.org", or through the web interface at <http://rt.cpan.org>.
73       I will be notified, and then you'll automatically be notified of
74       progress on your bug as I make changes.
75
77       Copyright 2006 Ricardo Signes, all rights reserved.
78
79       This program is free software; you can redistribute it and/or modify it
80       under the same terms as Perl itself.
81
82
83
84perl v5.8.8                       2006-06-05                Package::Reaper(3)
Impressum