Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] :: operator

Expand Messages
  • Mr. Shawn H. Corey
    ... You can think of it as meaning a sub-package. It is just another namespace, separate from the others. However, when is appears in a use statement, it means
    Message 1 of 2 , Jun 29, 2006
    • 0 Attachment
      On Thu, 2006-29-06 at 09:21 -0300, tnas wrote:
      > Hi folks,
      >
      > When I define several packages at the format:
      > package X::A;
      > package X::B;
      > páckage X::C;
      >
      > What mean the "::" operator?
      >
      > If someone help me will be greatly appreciated.

      You can think of it as meaning a sub-package. It is just another
      namespace, separate from the others.

      However, when is appears in a use statement, it means the first part(s)
      is(are) directory(-ies) and the last is the file name. For example:

      use File::Basename;

      means that somewhere on the end of a directory in @INC is
      File/Basename.pm Inside this file, you will find:

      package File::Basename;

      The name in the use and the package must be identical, including the
      case.

      See:
      perldoc -f package
      perldoc -f use
      perldoc perlmod (and search for "Packages")

      See `peldoc perlmodlib` for a list of standard modules/packages.



      --
      __END__

      Just my 0.00000002 million dollars worth,
      --- Shawn

      "For the things we have to learn before we can do them, we learn by doing them."
      Aristotle

      * Perl tutorials at http://perlmonks.org/?node=Tutorials
      * A searchable perldoc is at http://perldoc.perl.org/
    Your message has been successfully submitted and would be delivered to recipients shortly.