.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "superclass 3" .TH superclass 3 "2014-03-11" "perl v5.30.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" superclass \- Like parent, but with version checks .SH "VERSION" .IX Header "VERSION" version 0.003 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& package Baz; \& use superclass qw(Foo Bar), \*(AqBaz\*(Aq => 1.23; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Allows you to both load one or more modules, while setting up inheritance from those modules at the same time. .PP If a module in the import list is followed by something that doesn't look like a legal module name, the \f(CW\*(C`VERSION\*(C'\fR method will be called with it as an argument; .PP The synopsis example is mostly similar in effect to .PP .Vb 8 \& package Baz; \& BEGIN { \& require Foo; \& require Bar; \& require Baz; \& Baz\->VERSION(1.23) \& push @ISA, qw(Foo Bar Baz); \& } .Ve .PP Dotted-decimal versions should be given as a string, not a raw v\-string, and must include at least one decimal point. .PP .Vb 1 \& use superclass \*(AqBar\*(Aq => v65.65.65; # BAD: loads AAA.pm \& \& use superclass \*(AqBar\*(Aq => \*(Aqv6\*(Aq; # BAD: loads v6.pm \& \& use superclass \*(AqFoo\*(Aq => \*(Aqv0.10.0\*(Aq; # OK .Ve .PP If the first import argument is \f(CW\*(C`\-norequire\*(C'\fR, no files will be loaded (but any versions given will still be checked). .PP This is helpful for the case where a package lives within the current file or a differently named file: .PP .Vb 3 \& package MyHash; \& use Tie::Hash; \& use superclass \-norequire, \*(AqTie::StdHash\*(Aq; .Ve .SH "DIAGNOSTICS" .IX Header "DIAGNOSTICS" .IP "Class 'Foo' tried to inherit from itself" 4 .IX Item "Class 'Foo' tried to inherit from itself" Attempting to inherit from yourself generates a warning. .Sp .Vb 2 \& package Foo; \& use superclass \*(AqFoo\*(Aq; .Ve .SH "HISTORY" .IX Header "HISTORY" This module was forked from parent to add version checks. The parent module was forked from base to remove the cruft that had accumulated in it. .PP Authors of or contributors to predecessor modules include Rafaƫl Garcia-Suarez, Bart Lateur, Max Maischein, Anno Siegel, and Michael Schwern .SH "SUPPORT" .IX Header "SUPPORT" .SS "Bugs / Feature Requests" .IX Subsection "Bugs / Feature Requests" Please report any bugs or feature requests through the issue tracker at . You will be notified automatically of any progress on your issue. .SS "Source Code" .IX Subsection "Source Code" This is open source software. The code repository is available for public review and contribution under the terms of the license. .PP .PP .Vb 1 \& git clone https://github.com/dagolden/superclass.git .Ve .SH "AUTHOR" .IX Header "AUTHOR" David Golden .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2013 by David Golden. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.