1User::Identity::ArchiveU(s3e)r Contributed Perl DocumentaUtsieorn::Identity::Archive(3)
2
3
4
6 User::Identity::Archive - base class for archiving user information
7
9 User::Identity::Archive
10 is an User::Identity::Item
11
12 User::Identity::Archive is extended by
13 User::Identity::Archive::Plain
14
16 use User::Identity::Archive::Plain;
17 my $friends = User::Identity::Archive::Plain->new('friends');
18 $friends->from(\*FH);
19 $friends->from('.friends');
20
22 An archive stores collections. It depends on the type of archive how
23 and where that is done. Some archivers may limit the kinds of
24 selections which can be stored.
25
26 Extends "DESCRIPTION" in User::Identity::Item.
27
30 Extends "METHODS" in User::Identity::Item.
31
32 Constructors
33 Extends "Constructors" in User::Identity::Item.
34
35 User::Identity::Archive->new( [$name], %options )
36 -Option --Defined in --Default
37 description User::Identity::Item undef
38 from undef
39 name User::Identity::Item <required>
40 parent User::Identity::Item undef
41
42 description => STRING
43 from => FILEHANDLE|FILENAME
44 name => STRING
45 parent => OBJECT
46
47 Attributes
48 Extends "Attributes" in User::Identity::Item.
49
50 $obj->description()
51 Inherited, see "Attributes" in User::Identity::Item
52
53 $obj->name( [$newname] )
54 Inherited, see "Attributes" in User::Identity::Item
55
56 Collections
57 Extends "Collections" in User::Identity::Item.
58
59 $obj->add($collection, $role)
60 Inherited, see "Collections" in User::Identity::Item
61
62 $obj->addCollection( $object | <[$type], %options> )
63 Inherited, see "Collections" in User::Identity::Item
64
65 $obj->collection($name)
66 Inherited, see "Collections" in User::Identity::Item
67
68 $obj->parent( [$parent] )
69 Inherited, see "Collections" in User::Identity::Item
70
71 $obj->removeCollection($object|$name)
72 Inherited, see "Collections" in User::Identity::Item
73
74 $obj->type()
75 User::Identity::Archive->type()
76 Inherited, see "Collections" in User::Identity::Item
77
78 $obj->user()
79 Inherited, see "Collections" in User::Identity::Item
80
81 Searching
82 Extends "Searching" in User::Identity::Item.
83
84 $obj->find($collection, $role)
85 Inherited, see "Searching" in User::Identity::Item
86
87 Access to the archive
88 $obj->from($source, %options)
89 Read definitions from the specified $source, which usually can be a
90 filehandle or filename. The syntax used in the information $source
91 is archiver dependent.
92
93 Not all archivers implement "from()", so you may want to check with
94 "UNIVERSAL::can()" beforehand.
95
96 example:
97
98 use User::Identity::Archive::Some;
99 my $a = User::Identity::Archive::Some->new('xyz');
100 $a->from(\*STDIN) if $a->can('from');
101
103 Error: $object is not a collection.
104 The first argument is an object, but not of a class which extends
105 User::Identity::Collection.
106
107 Error: Cannot load collection module for $type ($class).
108 Either the specified $type does not exist, or that module named
109 $class returns compilation errors. If the type as specified in the
110 warning is not the name of a package, you specified a nickname
111 which was not defined. Maybe you forgot the 'require' the package
112 which defines the nickname.
113
114 Error: Creation of a collection via $class failed.
115 The $class did compile, but it was not possible to create an object
116 of that class using the options you specified.
117
118 Error: Don't know what type of collection you want to add.
119 If you add a collection, it must either by a collection object or a
120 list of options which can be used to create a collection object.
121 In the latter case, the type of collection must be specified.
122
123 Warning: No collection $name
124 The collection with $name does not exist and can not be created.
125
127 This module is part of User-Identity distribution version 1.00, built
128 on October 14, 2020. Website: http://perl.overmeer.net/CPAN/
129
131 Copyrights 2003-2020 by [Mark Overmeer <markov@cpan.org>]. For other
132 contributors see ChangeLog.
133
134 This program is free software; you can redistribute it and/or modify it
135 under the same terms as Perl itself. See http://dev.perl.org/licenses/
136
137
138
139perl v5.34.0 2021-07-27 User::Identity::Archive(3)