Template Toolkit and USE

Discussion in 'Perl Misc' started by Ronny Mandal, Jun 27, 2008.

  1. Ronny Mandal

    Ronny Mandal Guest

    Hi!

    I've installed the module URI from CPAN. This works perfectly on perl-
    scripts, however when running tpage CLI it issues an error message,
    e.g.

    ../test.tt:

    [% USE URI %]

    [ronny@pops]/home/ronny/development/tt(387): tpage test.tt
    plugin error - URI: plugin not found
    [ronny@pops]/home/ronny/development/tt(388):

    Any suggestions? When dumping the @INC, URI.pm is contained in at
    least one of the paths.

    Regards,

    Ronny Mandal
     
    Ronny Mandal, Jun 27, 2008
    #1
    1. Advertising

  2. Ronny Mandal

    Ben Morrow Guest

    Quoth Ronny Mandal <>:
    >
    > I've installed the module URI from CPAN. This works perfectly on perl-
    > scripts, however when running tpage CLI it issues an error message,
    > e.g.
    >
    > ./test.tt:
    >
    > [% USE URI %]
    >
    > [ronny@pops]/home/ronny/development/tt(387): tpage test.tt
    > plugin error - URI: plugin not found
    > [ronny@pops]/home/ronny/development/tt(388):
    >
    > Any suggestions? When dumping the @INC, URI.pm is contained in at
    > least one of the paths.


    If you are trying to load URI.pm itself as a plugin you will need to
    specify LOAD_PERL => 1 in you template config.

    Ben

    --
    Many users now operate their own computers day in and day out on various
    applications without ever writing a program. Indeed, many of these users
    cannot write new programs for their machines...
    -- F.P. Brooks, 'No Silver Bullet', 1987 []
     
    Ben Morrow, Jun 27, 2008
    #2
    1. Advertising

  3. Ronny Mandal

    Ronny Mandal Guest

    On Jun 27, 6:12 pm, Ben Morrow <> wrote:
    > Quoth Ronny Mandal <>:
    >
    >
    >
    > > I've installed the module URI from CPAN. This works perfectly on perl-
    > > scripts, however when running tpage CLI it issues an error message,
    > > e.g.

    >
    > > ./test.tt:

    >
    > > [% USE URI %]

    >
    > > [ronny@pops]/home/ronny/development/tt(387): tpage test.tt
    > > plugin error - URI: plugin not found
    > > [ronny@pops]/home/ronny/development/tt(388):

    >
    > > Any suggestions? When dumping the @INC, URI.pm is contained in at
    > > least one of the paths.

    >
    > If you are trying to load URI.pm itself as a plugin you will need to
    > specify LOAD_PERL => 1 in you template config.

    The system is obviously configured with that setting, I am able to
    load
    a phletora of modules, except the URI.pm.

    Or are you saying that the URI.pm requires this setting, the others
    not?

    -Ronny
     
    Ronny Mandal, Jun 27, 2008
    #3
  4. Ronny Mandal

    Ben Morrow Guest

    Quoth Ronny Mandal <>:
    > On Jun 27, 6:12 pm, Ben Morrow <> wrote:
    > > Quoth Ronny Mandal <>:
    > >
    > > > I've installed the module URI from CPAN. This works perfectly on perl-
    > > > scripts, however when running tpage CLI it issues an error message,
    > > > e.g.

    > >
    > > > ./test.tt:

    > >
    > > > [% USE URI %]

    > >
    > > > [ronny@pops]/home/ronny/development/tt(387): tpage test.tt
    > > > plugin error - URI: plugin not found
    > > > [ronny@pops]/home/ronny/development/tt(388):

    > >
    > > > Any suggestions? When dumping the @INC, URI.pm is contained in at
    > > > least one of the paths.

    > >
    > > If you are trying to load URI.pm itself as a plugin you will need to
    > > specify LOAD_PERL => 1 in you template config.

    >
    > The system is obviously configured with that setting, I am able to
    > load
    > a phletora of modules, except the URI.pm.
    >
    > Or are you saying that the URI.pm requires this setting, the others
    > not?


    I don't know. If you are having specific problems loading URI.pm, as
    opposed to loading other non-TT modules as plugins, please post a
    minimal complete program that demonstrates the problem.

    Ben

    --
    We do not stop playing because we grow old;
    we grow old because we stop playing.
     
    Ben Morrow, Jun 27, 2008
    #4
  5. Ronny Mandal

    Ted Zlatanov Guest

    On Fri, 27 Jun 2008 06:39:57 -0700 (PDT) Ronny Mandal <> wrote:

    RM> I've installed the module URI from CPAN. This works perfectly on perl-
    RM> scripts, however when running tpage CLI it issues an error message,
    RM> e.g.

    RM> ./test.tt:

    RM> [% USE URI %]

    RM> [ronny@pops]/home/ronny/development/tt(387): tpage test.tt
    RM> plugin error - URI: plugin not found
    RM> [ronny@pops]/home/ronny/development/tt(388):

    RM> Any suggestions? When dumping the @INC, URI.pm is contained in at
    RM> least one of the paths.

    TT plugins are not regular Perl modules (although it's not hard to write
    a TT plugin wrapper around a Perl module). See below for the full list
    of what's included with TT. You may want the URL plugin, I don't know
    your specific needs.

    http://template-toolkit.org/docs/manual/Plugins.html

    Ted
     
    Ted Zlatanov, Jun 30, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    7
    Views:
    598
  2. Peng Yu
    Replies:
    3
    Views:
    791
    Thomas J. Gritzan
    Oct 26, 2008
  3. Tony
    Replies:
    2
    Views:
    135
  4. valued customer
    Replies:
    1
    Views:
    97
    Dave Cross
    Jan 31, 2004
  5. Kevin

    Template Toolkit Problem

    Kevin, Apr 11, 2004, in forum: Perl Misc
    Replies:
    3
    Views:
    168
Loading...

Share This Page