Re: Bareword "Google::Adwords::Campaign" not allowed while "strict subs" in use



Grant wrote:
I'm trying to use the Google::Adwords perl modules but I'm getting:

Bareword "Google::Adwords::Campaign" not allowed while "strict subs" in use

Here is the beginning of my script:

use Google::Adwords::Campaign;
use Google::Adwords::CampaignService;
sub {
my $campaign = Google::Adwords::Campaign;

I get:

# ls /usr/lib/perl5/vendor_perl/5.8.8/Google/Adwords/Campaign.pm
/usr/lib/perl5/vendor_perl/5.8.8/Google/Adwords/Campaign.pm

Does anyone know why this is happening?

You need to change:

my $campaign = Google::Adwords::Campaign;


To:

my $campaign = Google::Adwords::Campaign->new();




John
--
Those people who think they know everything are a great
annoyance to those of us who do. -- Isaac Asimov
.



Relevant Pages

  • Re: Global subroutine - doesnt work
    ... Remove the script tags from the file. ... > Sub PrintDetails ... >> Hi John, ... >>> How can I create a Global subroutine. ...
    (microsoft.public.frontpage.programming)
  • Re: Detecting is hyperthreading is enabled with WMI?
    ... It is too bad that WMI does not give this info. ... have to be done to the script. ... Public Sub DisplayProcessorInfo ... dim ProcessorSet, Processor ...
    (microsoft.public.windowsxp.wmi)
  • Re: Roadshows, Part V
    ... each of the "skits" with John and Miles, there was a part where Miles ... script with cues for the lights and sound folks. ... "Listen, you know I really dig that Priscilla chick, right?" ...
    (soc.religion.mormon)
  • Cant make this page work
    ... I can't make this script work properly. ... The script at the bottom of the html page ... Does someone have a perl ... sub output_trace_headers { ...
    (comp.lang.javascript)
  • Re: Maybe I should try a different approach
    ... entire time my script is running, then have it close when my script is done and maybe have some dots keep adding to the text message until the script is fully completed? ... ' The "Three Ugly Hack" Script, ... Sub oATO_vbTimerEvent' timer event handler... ... Public Property Let Left ...
    (microsoft.public.scripting.vbscript)

Loading