[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-unattended/var/se3/unattended/install/linuxaux/opt/perl/lib/5.10.0/pod/ -> perlsub.pod (summary)

(no description)

File Size: 1463 lines (54 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 6 functions

  without()
  is()
  would()
  declaration()
  to()
  call()

Functions
Functions that are not part of a class:

without(there's really no difference from Perl's perspective.)   X-Ref
No description

is(its caller's values.X<call-by-reference> X<call-by-value>upcase_in($v1, $v2)   X-Ref
No description

would(definition even if we fed it things like this:@newlist = upcase(@list1, @list2)   X-Ref
No description

declaration(affects only interpretation of new-style calls to the function,where new-style is defined as not using the C<&> character. Inother words, if you call it like a built-in function, then it behaveslike a built-in function. If you call it like an old-fashionedsubroutine, then it behaves like an old-fashioned subroutine. Itnaturally falls out from this rule that prototypes have no influenceon subroutine references like C<\&foo> or on indirect subroutinecalls like C<&{$subref}> or C<< $subref->()   X-Ref
No description

to(the exact code called depends on inheritance.Because the intent of this feature is primarily to let you definesubroutines that work like built-in functions, here are prototypesfor some other functions that parse almost exactly like thecorresponding built-in.Declared as Called assub mylink ($$)   X-Ref
No description

call(the incorrect C<\&CORE::open> might appear to produce.Library modules should not in general export built-in names like C<open>or C<chdir> as part of their default C<@EXPORT> list, because these maysneak into someone else's namespace and change the semantics unexpectedly.Instead, if the module adds that name to C<@EXPORT_OK>, then it'spossible for a user to import the name explicitly, but not implicitly.That is, they could sayuse Module 'open';and it would import the C<open> override. But if they saiduse Module;they would get the default imports without overrides.The foregoing mechanism for overriding built-in is restricted, quitedeliberately, to the package that requests the import. There is a secondmethod that is sometimes applicable when you wish to override a built-ineverywhere, without regard to namespace boundaries. This is achieved byimporting a sub into the special namespace C<CORE::GLOBAL::>. Here is anexample that quite brazenly replaces the C<glob> operator with somethingthat understands regular expressions.package REGlob;require Exporter;@ISA = 'Exporter';@EXPORT_OK = 'glob';sub import {my $pkg = shift;return unless @_;my $sym = shift;my $where = ($sym =~ s/^GLOBAL_)   X-Ref
No description



Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1