X7ROOT File Manager
Current Path:
/usr/share/perl5/vendor_perl
usr
/
share
/
perl5
/
vendor_perl
/
π
..
π
Algorithm
π
App
π
Archive
π
Authen
π
B
π
CPAN
π
CPAN.pm
(138.01 KB)
π
Carp
π
Carp.pm
(30.32 KB)
π
Config
π
Data
π
Date
π
Digest
π
Digest.pm
(10.46 KB)
π
Encode
π
Env.pm
(5.39 KB)
π
Error
π
Error.pm
(24.29 KB)
π
Expect.pm
(98.09 KB)
π
Exporter
π
Exporter.pm
(18.31 KB)
π
ExtUtils
π
Fatal.pm
(56.81 KB)
π
File
π
Filter
π
Getopt
π
Git
π
Git.pm
(46.95 KB)
π
HTML
π
HTTP
π
IO
π
IPC
π
JSON
π
LWP
π
LWP.pm
(21.17 KB)
π
Locale
π
MRO
π
Math
π
Module
π
Mozilla
π
Net
π
POD2
π
Package
π
Params
π
Parse
π
Perl
π
PerlIO
π
Pod
π
Software
π
Sub
π
TAP
π
Term
π
Test
π
Test2
π
Test2.pm
(6.24 KB)
π
Text
π
Thread
π
Time
π
Try
π
Types
π
WWW
π
autodie
π
autodie.pm
(12.58 KB)
π
bigint.pm
(22.85 KB)
π
bignum.pm
(20.64 KB)
π
bigrat.pm
(15.78 KB)
π
constant.pm
(14.38 KB)
π
experimental.pm
(6.83 KB)
π
inc
π
lib
π
libwww
π
local
π
newgetopt.pl
(2.15 KB)
π
ok.pm
(967 B)
π
parent.pm
(2.51 KB)
π
perldoc.pod
(9.16 KB)
π
perlfaq.pm
(77 B)
π
perlfaq.pod
(22.22 KB)
π
perlfaq1.pod
(14.12 KB)
π
perlfaq2.pod
(9.24 KB)
π
perlfaq3.pod
(36.66 KB)
π
perlfaq4.pod
(87.3 KB)
π
perlfaq5.pod
(54.21 KB)
π
perlfaq6.pod
(38.69 KB)
π
perlfaq7.pod
(36.93 KB)
π
perlfaq8.pod
(48.93 KB)
π
perlfaq9.pod
(14.5 KB)
π
perlglossary.pod
(134.02 KB)
Editing: parent.pm
package parent; use strict; our $VERSION = '0.237'; sub import { my $class = shift; my $inheritor = caller(0); if ( @_ and $_[0] eq '-norequire' ) { shift @_; } else { for ( my @filename = @_ ) { s{::|'}{/}g; require "$_.pm"; # dies if the file is not found } } { no strict 'refs'; push @{"$inheritor\::ISA"}, @_; # dies if a loop is detected }; }; 1; __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 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-2017 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
Upload File
Create Folder