in reply to Re: Re: Perl module symbol import versus direct invocation
in thread Perl module symbol import versus direct invocation
Ah, that's right - you get the package name. I knew this ;).#!/usr/local/bin/perl -w use strict; package Test; print Test->method(); sub method { my $self=shift; return $self; } __END__ Test
So that answers your question: if no object has been created, calling a function with -> results in the function getting the package name as the first argument. This also explains the error in your script: Date::Calc::Add_Delta_Days gets 'Date::Calc' as the year, hence the usage message.
Update: See bart's post below for some more information on -> syntax.
CU
Robartes-
|
|---|