… | |
… | |
169 | for (@REFLECT) { |
169 | for (@REFLECT) { |
170 | my $reflect = JSON::XS::decode_json $_; |
170 | my $reflect = JSON::XS::decode_json $_; |
171 | $REFLECT{$reflect->{class}} = $reflect; |
171 | $REFLECT{$reflect->{class}} = $reflect; |
172 | } |
172 | } |
173 | |
173 | |
|
|
174 | # this is decidedly evil |
|
|
175 | $REFLECT{object}{flags} = [grep $_, map /^FLAG_([A-Z0-9_]+)$/ && lc $1, keys %{"cf::"}]; |
|
|
176 | |
174 | ############################################################################# |
177 | ############################################################################# |
175 | |
178 | |
176 | =head2 GLOBAL VARIABLES |
179 | =head2 GLOBAL VARIABLES |
177 | |
180 | |
178 | =over 4 |
181 | =over 4 |
… | |
… | |
231 | that call. |
234 | that call. |
232 | |
235 | |
233 | =item %cf::REFLECT |
236 | =item %cf::REFLECT |
234 | |
237 | |
235 | Contains, for each (C++) class name, a hash reference with information |
238 | Contains, for each (C++) class name, a hash reference with information |
236 | about object members (methods, scalars and arrays) and other metadata, |
239 | about object members (methods, scalars, arrays and flags) and other |
237 | which is useful for introspection. |
240 | metadata, which is useful for introspection. |
238 | |
241 | |
239 | =back |
242 | =back |
240 | |
243 | |
241 | =cut |
244 | =cut |
242 | |
245 | |