| 1 | package FindApp::Subs; | ||
| 2 | |||
| 3 | use v5.10; | ||
| 4 | use strict; | ||
| 5 | use warnings; | ||
| 6 | |||
| 7 | use Exporter qw<import>; | ||
| 8 | use FindApp::Utils <function stashes>; | ||
| 9 | use FindApp (); | ||
| 10 | |||
| 11 | my %seen; | ||
| 12 | for my $stash (stashes @FindApp::ISA, @FindApp::Object::ISA) { | ||
| 13 | while (my($name, $glob) = each %$stash) { | ||
| 14 | ref \$glob eq "GLOB" && # weird things find their way into the stashes | ||
| 15 | *$glob{CODE} && # only want code refs | ||
| 16 | $name =~ /\p{lower}/ && # avoid all-caps idents | ||
| 17 | $name =~ /^\w+$/ && # avoid for example "(eq" for overloaded eq ops | ||
| 18 | $name !~ /^op_/ && # or their implementations | ||
| 19 | $name !~ /^as_/ && # or their implementations | ||
| 20 | $seen{$name}++ | ||
| 21 | } | ||
| 22 | } | ||
| 23 | |||
| 24 | delete @seen{ <import init copy params> }; | ||
| 25 | |||
| 26 | ########################## | ||
| 27 | # BUILD *ALL*THE*THINGS* # | ||
| 28 | ########################## | ||
| 29 | |||
| 30 | our (@EXPORT, @EXPORT_OK, %EXPORT_TAGS); | ||
| 31 | for my $SUB (@EXPORT_OK = sort keys %seen) { | ||
| 32 | function $SUB => sub { FindApp->old->$SUB(@_) }; | ||
| 33 | #say $SUB; | ||
| 34 | } | ||
| 35 | |||
| 36 | *EXPORT = $EXPORT_TAGS{all} = \@EXPORT_OK; | ||
| 37 | |||
| 38 | 1; | ||
| 39 | |||
| 40 | =encoding utf8 | ||
| 41 | |||
| 42 | =head1 NAME | ||
| 43 | |||
| 44 | FindApp::Subs - FIXME | ||
| 45 | |||
| 46 | =head1 SYNOPSIS | ||
| 47 | |||
| 48 | use FindApp::Subs; | ||
| 49 | |||
| 50 | =head1 DESCRIPTION | ||
| 51 | |||
| 52 | FIXME | ||
| 53 | |||
| 54 | =head2 Exports | ||
| 55 | |||
| 56 | =over | ||
| 57 | |||
| 58 | =item add_allowed_bindirs | ||
| 59 | |||
| 60 | =item add_allowed_libdirs | ||
| 61 | |||
| 62 | =item add_allowed_mandirs | ||
| 63 | |||
| 64 | =item add_allowed_rootdir | ||
| 65 | |||
| 66 | =item add_bindirs_allowed | ||
| 67 | |||
| 68 | =item add_bindirs_found | ||
| 69 | |||
| 70 | =item add_bindirs_wanted | ||
| 71 | |||
| 72 | =item add_found_bindirs | ||
| 73 | |||
| 74 | =item add_found_libdirs | ||
| 75 | |||
| 76 | =item add_found_mandirs | ||
| 77 | |||
| 78 | =item add_found_rootdir | ||
| 79 | |||
| 80 | =item add_libdirs_allowed | ||
| 81 | |||
| 82 | =item add_libdirs_found | ||
| 83 | |||
| 84 | =item add_libdirs_wanted | ||
| 85 | |||
| 86 | =item add_mandirs_allowed | ||
| 87 | |||
| 88 | =item add_mandirs_found | ||
| 89 | |||
| 90 | =item add_mandirs_wanted | ||
| 91 | |||
| 92 | =item add_rootdir_allowed | ||
| 93 | |||
| 94 | =item add_rootdir_found | ||
| 95 | |||
| 96 | =item add_rootdir_wanted | ||
| 97 | |||
| 98 | =item add_wanted_bindirs | ||
| 99 | |||
| 100 | =item add_wanted_libdirs | ||
| 101 | |||
| 102 | =item add_wanted_mandirs | ||
| 103 | |||
| 104 | =item add_wanted_rootdir | ||
| 105 | |||
| 106 | =item adopts_children | ||
| 107 | |||
| 108 | =item adopts_parents | ||
| 109 | |||
| 110 | =item allocate_groups | ||
| 111 | |||
| 112 | =item allowed | ||
| 113 | |||
| 114 | =item allowed_bindirs | ||
| 115 | |||
| 116 | =item allowed_libdirs | ||
| 117 | |||
| 118 | =item allowed_mandirs | ||
| 119 | |||
| 120 | =item allowed_rootdir | ||
| 121 | |||
| 122 | =item another_file_required | ||
| 123 | |||
| 124 | =item another_module_used | ||
| 125 | |||
| 126 | =item app_root | ||
| 127 | |||
| 128 | =item bindirs | ||
| 129 | |||
| 130 | =item bindirs_allowed | ||
| 131 | |||
| 132 | =item bindirs_are | ||
| 133 | |||
| 134 | =item bindirs_found | ||
| 135 | |||
| 136 | =item bindirs_have | ||
| 137 | |||
| 138 | =item bindirs_wanted | ||
| 139 | |||
| 140 | =item canonical_subdirs | ||
| 141 | |||
| 142 | =item class | ||
| 143 | |||
| 144 | =item constraint_text | ||
| 145 | |||
| 146 | =item copy_founds_to_globals | ||
| 147 | |||
| 148 | =item debug | ||
| 149 | |||
| 150 | =item debugging | ||
| 151 | |||
| 152 | =item default_origin | ||
| 153 | |||
| 154 | =item export_bin_to_env | ||
| 155 | |||
| 156 | =item exported_envars | ||
| 157 | |||
| 158 | =item export_lib_to_env | ||
| 159 | |||
| 160 | =item export_man_to_env | ||
| 161 | |||
| 162 | =item export_root_to_env | ||
| 163 | |||
| 164 | =item export_to_env | ||
| 165 | |||
| 166 | =item findapp | ||
| 167 | |||
| 168 | =item findapp_and_export | ||
| 169 | |||
| 170 | =item findapp_root | ||
| 171 | |||
| 172 | =item findapp_root_from_path | ||
| 173 | |||
| 174 | =item find_devperl_bin | ||
| 175 | |||
| 176 | =item find_devperl_lib | ||
| 177 | |||
| 178 | =item find_devperl_man | ||
| 179 | |||
| 180 | =item forgotten_devperl_bin | ||
| 181 | |||
| 182 | =item forgotten_devperl_lib | ||
| 183 | |||
| 184 | =item forgotten_devperl_man | ||
| 185 | |||
| 186 | =item forgotten_devperls | ||
| 187 | |||
| 188 | =item found | ||
| 189 | |||
| 190 | =item found_bindirs | ||
| 191 | |||
| 192 | =item found_libdirs | ||
| 193 | |||
| 194 | =item found_mandirs | ||
| 195 | |||
| 196 | =item found_rootdir | ||
| 197 | |||
| 198 | =item get_allowed_bindirs | ||
| 199 | |||
| 200 | =item get_allowed_libdirs | ||
| 201 | |||
| 202 | =item get_allowed_mandirs | ||
| 203 | |||
| 204 | =item get_allowed_rootdir | ||
| 205 | |||
| 206 | =item get_bindirs_allowed | ||
| 207 | |||
| 208 | =item get_bindirs_found | ||
| 209 | |||
| 210 | =item get_bindirs_wanted | ||
| 211 | |||
| 212 | =item get_found_bindirs | ||
| 213 | |||
| 214 | =item get_found_libdirs | ||
| 215 | |||
| 216 | =item get_found_mandirs | ||
| 217 | |||
| 218 | =item get_found_rootdir | ||
| 219 | |||
| 220 | =item get_libdirs_allowed | ||
| 221 | |||
| 222 | =item get_libdirs_found | ||
| 223 | |||
| 224 | =item get_libdirs_wanted | ||
| 225 | |||
| 226 | =item get_mandirs_allowed | ||
| 227 | |||
| 228 | =item get_mandirs_found | ||
| 229 | |||
| 230 | =item get_mandirs_wanted | ||
| 231 | |||
| 232 | =item get_rootdir_allowed | ||
| 233 | |||
| 234 | =item get_rootdir_found | ||
| 235 | |||
| 236 | =item get_rootdir_wanted | ||
| 237 | |||
| 238 | =item get_wanted_bindirs | ||
| 239 | |||
| 240 | =item get_wanted_libdirs | ||
| 241 | |||
| 242 | =item get_wanted_mandirs | ||
| 243 | |||
| 244 | =item get_wanted_rootdir | ||
| 245 | |||
| 246 | =item group | ||
| 247 | |||
| 248 | =item group_names | ||
| 249 | |||
| 250 | =item groups | ||
| 251 | |||
| 252 | =item has_app_root | ||
| 253 | |||
| 254 | =item has_origin | ||
| 255 | |||
| 256 | =item libdirs | ||
| 257 | |||
| 258 | =item libdirs_allowed | ||
| 259 | |||
| 260 | =item libdirs_are | ||
| 261 | |||
| 262 | =item libdirs_found | ||
| 263 | |||
| 264 | =item libdirs_have | ||
| 265 | |||
| 266 | =item libdirs_wanted | ||
| 267 | |||
| 268 | =item load_files | ||
| 269 | |||
| 270 | =item load_libraries | ||
| 271 | |||
| 272 | =item load_modules | ||
| 273 | |||
| 274 | =item load_wanted | ||
| 275 | |||
| 276 | =item mandirs | ||
| 277 | |||
| 278 | =item mandirs_allowed | ||
| 279 | |||
| 280 | =item mandirs_are | ||
| 281 | |||
| 282 | =item mandirs_found | ||
| 283 | |||
| 284 | =item mandirs_have | ||
| 285 | |||
| 286 | =item mandirs_wanted | ||
| 287 | |||
| 288 | =item new | ||
| 289 | |||
| 290 | =item object | ||
| 291 | |||
| 292 | =item old | ||
| 293 | |||
| 294 | =item origin | ||
| 295 | |||
| 296 | =item original_exports | ||
| 297 | |||
| 298 | =item path_passes_constraints | ||
| 299 | |||
| 300 | =item prefers_dot | ||
| 301 | |||
| 302 | =item renew | ||
| 303 | |||
| 304 | =item required_files | ||
| 305 | |||
| 306 | =item reset_all_groups | ||
| 307 | |||
| 308 | =item reset_origin | ||
| 309 | |||
| 310 | =item rootdir | ||
| 311 | |||
| 312 | =item rootdir_allowed | ||
| 313 | |||
| 314 | =item rootdir_found | ||
| 315 | |||
| 316 | =item rootdir_has | ||
| 317 | |||
| 318 | =item rootdir_is | ||
| 319 | |||
| 320 | =item rootdirs | ||
| 321 | |||
| 322 | =item rootdir_wanted | ||
| 323 | |||
| 324 | =item set_allowed_bindirs | ||
| 325 | |||
| 326 | =item set_allowed_libdirs | ||
| 327 | |||
| 328 | =item set_allowed_mandirs | ||
| 329 | |||
| 330 | =item set_allowed_rootdir | ||
| 331 | |||
| 332 | =item set_bindirs_allowed | ||
| 333 | |||
| 334 | =item set_bindirs_found | ||
| 335 | |||
| 336 | =item set_bindirs_wanted | ||
| 337 | |||
| 338 | =item set_found_bindirs | ||
| 339 | |||
| 340 | =item set_found_libdirs | ||
| 341 | |||
| 342 | =item set_found_mandirs | ||
| 343 | |||
| 344 | =item set_found_rootdir | ||
| 345 | |||
| 346 | =item set_libdirs_allowed | ||
| 347 | |||
| 348 | =item set_libdirs_found | ||
| 349 | |||
| 350 | =item set_libdirs_wanted | ||
| 351 | |||
| 352 | =item set_mandirs_allowed | ||
| 353 | |||
| 354 | =item set_mandirs_found | ||
| 355 | |||
| 356 | =item set_mandirs_wanted | ||
| 357 | |||
| 358 | =item set_rootdir_allowed | ||
| 359 | |||
| 360 | =item set_rootdir_found | ||
| 361 | |||
| 362 | =item set_rootdir_wanted | ||
| 363 | |||
| 364 | =item set_wanted_bindirs | ||
| 365 | |||
| 366 | =item set_wanted_libdirs | ||
| 367 | |||
| 368 | =item set_wanted_mandirs | ||
| 369 | |||
| 370 | =item set_wanted_rootdir | ||
| 371 | |||
| 372 | =item shell_settings | ||
| 373 | |||
| 374 | =item show_shell_var | ||
| 375 | |||
| 376 | =item some_devperl_dir | ||
| 377 | |||
| 378 | =item subgroup_names | ||
| 379 | |||
| 380 | =item subgroups | ||
| 381 | |||
| 382 | =item tracing | ||
| 383 | |||
| 384 | =item use_all_devperls | ||
| 385 | |||
| 386 | =item used_modules | ||
| 387 | |||
| 388 | =item use_my_devperl | ||
| 389 | |||
| 390 | =item use_no_devperls | ||
| 391 | |||
| 392 | =item use_some_devperls | ||
| 393 | |||
| 394 | =item wanted | ||
| 395 | |||
| 396 | =item wanted_bindirs | ||
| 397 | |||
| 398 | =item wanted_libdirs | ||
| 399 | |||
| 400 | =item wanted_mandirs | ||
| 401 | |||
| 402 | =item wanted_rootdir | ||
| 403 | |||
| 404 | |||
| 405 | =back | ||
| 406 | |||
| 407 | =head1 EXAMPLES | ||
| 408 | |||
| 409 | =head1 ENVIRONMENT | ||
| 410 | |||
| 411 | =head1 SEE ALSO | ||
| 412 | |||
| 413 | =over | ||
| 414 | |||
| 415 | =item L<FindApp> | ||
| 416 | |||
| 417 | =back | ||
| 418 | |||
| 419 | =head1 CAVEATS AND PROVISOS | ||
| 420 | |||
| 421 | =head1 BUGS AND LIMITATIONS | ||
| 422 | |||
| 423 | =head1 HISTORY | ||
| 424 | |||
| 425 | =head1 AUTHOR | ||
| 426 | |||
| 427 | Tom Christiansen << <tchrist@perl.com> >> | ||
| 428 | |||
| 429 | =head1 LICENCE AND COPYRIGHT | ||
| 430 | |||
| 431 | Copyright (c) 2016, Tom Christiansen C<< <tchrist@perl.com> >>. | ||
| 432 | All Rights Reserved. | ||
| 433 | |||
| 434 | This module is free software; you can redistribute it and/or | ||
| 435 | modify it under the same terms as Perl itself. See L<perlartistic>. | ||
| 436 | |||
| 437 | =cut | ||
| 438 |