golden hour
/usr/share/perl5/vendor_perl
⬆️ Go Up
Upload
File/Folder
Size
Actions
App
-
Del
OK
Archive
-
Del
OK
B
-
Del
OK
Bundle
-
Del
OK
Business
-
Del
OK
CGI
-
Del
OK
CGI.pm
255.24 KB
Del
OK
CPAN
-
Del
OK
CPANPLUS
-
Del
OK
CPANPLUS.pm
7.05 KB
Del
OK
Carp
-
Del
OK
Carp.pm
19.93 KB
Del
OK
DBIx
-
Del
OK
Data
-
Del
OK
Date
-
Del
OK
Devel
-
Del
OK
Digest
-
Del
OK
Digest.pm
10.35 KB
Del
OK
Encode
-
Del
OK
Env.pm
5.39 KB
Del
OK
Error
-
Del
OK
Error.pm
24.27 KB
Del
OK
Expect.pm
53.44 KB
Del
OK
Expect.pod
42.71 KB
Del
OK
Exporter
-
Del
OK
Exporter.pm
18.31 KB
Del
OK
ExtUtils
-
Del
OK
Fatal.pm
45.16 KB
Del
OK
File
-
Del
OK
Getopt
-
Del
OK
Git
-
Del
OK
Git.pm
42.55 KB
Del
OK
HTML
-
Del
OK
HTTP
-
Del
OK
IO
-
Del
OK
IPC
-
Del
OK
JSON
-
Del
OK
LWP
-
Del
OK
Locale
-
Del
OK
Log
-
Del
OK
Module
-
Del
OK
Mozilla
-
Del
OK
Net
-
Del
OK
POD2
-
Del
OK
Params
-
Del
OK
Parse
-
Del
OK
Perl
-
Del
OK
Perl4
-
Del
OK
Pod
-
Del
OK
RPC
-
Del
OK
Switch.pm
27.79 KB
Del
OK
TAP
-
Del
OK
Term
-
Del
OK
Test
-
Del
OK
Text
-
Del
OK
Thread
-
Del
OK
Time
-
Del
OK
Try
-
Del
OK
Types
-
Del
OK
Version
-
Del
OK
WWW
-
Del
OK
abbrev.pl
819 B
Del
OK
assert.pl
1.27 KB
Del
OK
autodie
-
Del
OK
autodie.pm
11.83 KB
Del
OK
bigfloat.pl
7.14 KB
Del
OK
bigint.pl
8.71 KB
Del
OK
bigrat.pl
4.35 KB
Del
OK
cacheout.pl
1.1 KB
Del
OK
chat2.pl
9.73 KB
Del
OK
common
-
Del
OK
complete.pl
3.12 KB
Del
OK
constant.pm
13.04 KB
Del
OK
ctime.pl
1.93 KB
Del
OK
dotsh.pl
2.12 KB
Del
OK
exceptions.pl
1.7 KB
Del
OK
fastcwd.pl
1019 B
Del
OK
find.pl
1.16 KB
Del
OK
finddepth.pl
1.1 KB
Del
OK
flush.pl
642 B
Del
OK
ftp.pl
23.53 KB
Del
OK
getcwd.pl
1.37 KB
Del
OK
getopt.pl
1.27 KB
Del
OK
getopts.pl
1.35 KB
Del
OK
hostname.pl
727 B
Del
OK
importenv.pl
283 B
Del
OK
inc
-
Del
OK
lib
-
Del
OK
local
-
Del
OK
look.pl
1.23 KB
Del
OK
newgetopt.pl
2.15 KB
Del
OK
open2.pl
185 B
Del
OK
open3.pl
185 B
Del
OK
parent.pm
2.83 KB
Del
OK
perldoc.pod
8.25 KB
Del
OK
pwd.pl
1.44 KB
Del
OK
shellwords.pl
280 B
Del
OK
stat.pl
525 B
Del
OK
syslog.pl
4.69 KB
Del
OK
tainted.pl
164 B
Del
OK
termcap.pl
4.02 KB
Del
OK
timelocal.pl
690 B
Del
OK
validate.pl
3.64 KB
Del
OK
Edit: parent.pm
package parent; use strict; use vars qw($VERSION); $VERSION = '0.225'; sub import { my $class = shift; my $inheritor = caller(0); if ( @_ and $_[0] eq '-norequire' ) { shift @_; } else { for ( my @filename = @_ ) { if ( $_ eq $inheritor ) { warn "Class '$inheritor' tried to inherit from itself\n"; }; s{::|'}{/}g; require "$_.pm"; # dies if the file is not found } } { no strict 'refs'; push @{"$inheritor\::ISA"}, @_; }; }; "All your base are belong to us" __END__ =encoding utf8 =head1 NAME parent - Establish an ISA relationship with base classes at compile time =head1 SYNOPSIS package Baz; use parent qw(Foo Bar); =head1 DESCRIPTION Allows you to both load one or more modules, while setting up inheritance from those modules at the same time. Mostly similar in effect to package Baz; BEGIN { require Foo; require Bar; push @ISA, qw(Foo Bar); } By default, every base class needs to live in a file of its own. If you want to have a subclass and its parent class in the same file, you can tell C<parent> not to load any modules by using the C<-norequire> switch: package Foo; sub exclaim { "I CAN HAS PERL" } package DoesNotLoadFooBar; use parent -norequire, 'Foo', 'Bar'; # will not go looking for Foo.pm or Bar.pm This is equivalent to the following code: package Foo; sub exclaim { "I CAN HAS PERL" } package DoesNotLoadFooBar; push @DoesNotLoadFooBar::ISA, 'Foo', 'Bar'; This is also helpful for the case where a package lives within a differently named file: package MyHash; use Tie::Hash; use parent -norequire, 'Tie::StdHash'; This is equivalent to the following code: package MyHash; require Tie::Hash; push @ISA, 'Tie::StdHash'; If you want to load a subclass from a file that C<require> would not consider an eligible filename (that is, it does not end in either C<.pm> or C<.pmc>), use the following code: package MySecondPlugin; require './plugins/custom.plugin'; # contains Plugin::Custom use parent -norequire, 'Plugin::Custom'; =head1 DIAGNOSTICS =over 4 =item Class 'Foo' tried to inherit from itself Attempting to inherit from yourself generates a warning. package Foo; use parent 'Foo'; =back =head1 HISTORY This module was forked from L<base> to remove the cruft that had accumulated in it. =head1 CAVEATS =head1 SEE ALSO L<base> =head1 AUTHORS AND CONTRIBUTORS Rafaël Garcia-Suarez, Bart Lateur, Max Maischein, Anno Siegel, Michael Schwern =head1 MAINTAINER Max Maischein C< corion@cpan.org > Copyright (c) 2007-10 Max Maischein C<< <corion@cpan.org> >> Based on the idea of C<base.pm>, which was introduced with Perl 5.004_04. =head1 LICENSE This module is released under the same terms as Perl itself. =cut
Save