ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- usr/lib64/perl5/Config.pm000064400000006176152345023060011101 0ustar00# This file was created by configpm when Perl was built. Any changes # made to this file will be lost the next time perl is built. # for a description of the variables, please have a look at the # Glossary file, as written in the Porting folder, or use the url: # http://perl5.git.perl.org/perl.git/blob/HEAD:/Porting/Glossary package Config; use strict; use warnings; use vars '%Config', '$VERSION'; $VERSION = "5.026003"; # Skip @Config::EXPORT because it only contains %Config, which we special # case below as it's not a function. @Config::EXPORT won't change in the # lifetime of Perl 5. my %Export_Cache = (myconfig => 1, config_sh => 1, config_vars => 1, config_re => 1, compile_date => 1, local_patches => 1, bincompat_options => 1, non_bincompat_options => 1, header_files => 1); @Config::EXPORT = qw(%Config); @Config::EXPORT_OK = keys %Export_Cache; # Need to stub all the functions to make code such as print Config::config_sh # keep working sub bincompat_options; sub compile_date; sub config_re; sub config_sh; sub config_vars; sub header_files; sub local_patches; sub myconfig; sub non_bincompat_options; # Define our own import method to avoid pulling in the full Exporter: sub import { shift; @_ = @Config::EXPORT unless @_; my @funcs = grep $_ ne '%Config', @_; my $export_Config = @funcs < @_ ? 1 : 0; no strict 'refs'; my $callpkg = caller(0); foreach my $func (@funcs) { die qq{"$func" is not exported by the Config module\n} unless $Export_Cache{$func}; *{$callpkg.'::'.$func} = \&{$func}; } *{"$callpkg\::Config"} = \%Config if $export_Config; return; } die "$0: Perl lib version (5.26.3) doesn't match executable '$^X' version ($])" unless $^V; $^V eq 5.26.3 or die sprintf "%s: Perl lib version (5.26.3) doesn't match executable '$^X' version (%vd)", $0, $^V; sub FETCH { my($self, $key) = @_; # check for cached value (which may be undef so we use exists not defined) return exists $self->{$key} ? $self->{$key} : $self->fetch_string($key); } sub TIEHASH { bless $_[1], $_[0]; } sub DESTROY { } sub AUTOLOAD { require 'Config_heavy.pl'; goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/; die "&Config::AUTOLOAD failed on $Config::AUTOLOAD"; } # tie returns the object, so the value returned to require will be true. tie %Config, 'Config', { archlibexp => '/usr/lib64/perl5', archname => 'x86_64-linux-thread-multi', cc => 'gcc', d_readlink => 'define', d_symlink => 'define', dlext => 'so', dlsrc => 'dl_dlopen.xs', dont_use_nlink => undef, exe_ext => '', inc_version_list => ' ', intsize => '4', ldlibpthname => 'LD_LIBRARY_PATH', libpth => '/usr/local/lib64 /lib64 /usr/lib64 /usr/local/lib /usr/lib /lib/../lib64 /usr/lib/../lib64 /lib', osname => 'linux', osvers => '5.14.0-570.12.1.el9_6.x86_64', path_sep => ':', privlibexp => '/usr/share/perl5', scriptdir => '/usr/bin', sitearchexp => '/usr/local/lib64/perl5', sitelibexp => '/usr/local/share/perl5', so => 'so', useithreads => 'define', usevendorprefix => 'define', version => '5.26.3', }; usr/local/lib64/perl5/Template/Config.pm000044400000032743152346057640013757 0ustar00#============================================================= -*-perl-*- # # Template::Config # # DESCRIPTION # Template Toolkit configuration module. # # AUTHOR # Andy Wardley # # COPYRIGHT # Copyright (C) 1996-2022 Andy Wardley. All Rights Reserved. # # This module is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # #======================================================================== package Template::Config; use strict; use warnings; use base 'Template::Base'; our $VERSION = '3.106'; our $DEBUG; $DEBUG = 0 unless defined $DEBUG; our $ERROR = ''; our $CONTEXT = 'Template::Context'; our $FILTERS = 'Template::Filters'; our $ITERATOR = 'Template::Iterator'; our $PARSER = 'Template::Parser'; our $PLUGINS = 'Template::Plugins'; our $PROVIDER = 'Template::Provider'; our $SERVICE = 'Template::Service'; our $STASH; $STASH = 'Template::Stash::XS'; our $CONSTANTS = 'Template::Namespace::Constants'; our $LATEX_PATH; our $PDFLATEX_PATH; our $DVIPS_PATH; our @PRELOAD = ( $CONTEXT, $FILTERS, $ITERATOR, $PARSER, $PLUGINS, $PROVIDER, $SERVICE, $STASH ); # the following is set at installation time by the Makefile.PL our $INSTDIR = ''; #======================================================================== # --- CLASS METHODS --- #======================================================================== #------------------------------------------------------------------------ # preload($module, $module, ...) # # Preloads all the standard TT modules that are likely to be used, along # with any other passed as arguments. #------------------------------------------------------------------------ sub preload { my $class = shift; foreach my $module (@PRELOAD, @_) { $class->load($module) || return; }; return 1; } #------------------------------------------------------------------------ # load($module) # # Load a module via require(). Any occurrences of '::' in the module name # are be converted to '/' and '.pm' is appended. Returns 1 on success # or undef on error. Use $class->error() to examine the error string. #------------------------------------------------------------------------ sub load { my ($class, $module) = @_; $module =~ s[::][/]g; $module .= '.pm'; return 1 if $INC{$module}; eval { require $module; }; return $@ ? $class->error("failed to load $module: $@") : 1; } #------------------------------------------------------------------------ # parser(\%params) # # Instantiate a new parser object of the class whose name is denoted by # the package variable $PARSER (default: Template::Parser). Returns # a reference to a newly instantiated parser object or undef on error. # The class error() method can be called without arguments to examine # the error message generated by this failure. #------------------------------------------------------------------------ sub parser { my $class = shift; my $params = defined($_[0]) && ref($_[0]) eq 'HASH' ? shift : { @_ }; return undef unless $class->load($PARSER); return $PARSER->new($params) || $class->error("failed to create parser: ", $PARSER->error); } #------------------------------------------------------------------------ # provider(\%params) # # Instantiate a new template provider object (default: Template::Provider). # Returns an object reference or undef on error, as above. #------------------------------------------------------------------------ sub provider { my $class = shift; my $params = defined($_[0]) && ref($_[0]) eq 'HASH' ? shift : { @_ }; return undef unless $class->load($PROVIDER); return $PROVIDER->new($params) || $class->error( "failed to create template provider: ", $PROVIDER->error ); } #------------------------------------------------------------------------ # plugins(\%params) # # Instantiate a new plugins provider object (default: Template::Plugins). # Returns an object reference or undef on error, as above. #------------------------------------------------------------------------ sub plugins { my $class = shift; my $params = defined($_[0]) && ref($_[0]) eq 'HASH' ? shift : { @_ }; return undef unless $class->load($PLUGINS); return $PLUGINS->new($params) || $class->error( "failed to create plugin provider: ", $PLUGINS->error ); } #------------------------------------------------------------------------ # filters(\%params) # # Instantiate a new filters provider object (default: Template::Filters). # Returns an object reference or undef on error, as above. #------------------------------------------------------------------------ sub filters { my $class = shift; my $params = defined($_[0]) && ref($_[0]) eq 'HASH' ? shift : { @_ }; return undef unless $class->load($FILTERS); return $FILTERS->new($params) || $class->error( "failed to create filter provider: ", $FILTERS->error ); } #------------------------------------------------------------------------ # iterator(\@list) # # Instantiate a new Template::Iterator object (default: Template::Iterator). # Returns an object reference or undef on error, as above. #------------------------------------------------------------------------ sub iterator { my $class = shift; my $list = shift; return undef unless $class->load($ITERATOR); return $ITERATOR->new($list, @_) || $class->error("failed to create iterator: ", $ITERATOR->error); } #------------------------------------------------------------------------ # stash(\%vars) # # Instantiate a new template variable stash object (default: # Template::Stash). Returns object or undef, as above. #------------------------------------------------------------------------ sub stash { my $class = shift; my $params = defined($_[0]) && ref($_[0]) eq 'HASH' ? shift : { @_ }; return undef unless $class->load($STASH); return $STASH->new($params) || $class->error( "failed to create stash: ", $STASH->error ); } #------------------------------------------------------------------------ # context(\%params) # # Instantiate a new template context object (default: Template::Context). # Returns object or undef, as above. #------------------------------------------------------------------------ sub context { my $class = shift; my $params = defined($_[0]) && ref($_[0]) eq 'HASH' ? shift : { @_ }; return undef unless $class->load($CONTEXT); return $CONTEXT->new($params) || $class->error( "failed to create context: ", $CONTEXT->error ); } #------------------------------------------------------------------------ # service(\%params) # # Instantiate a new template context object (default: Template::Service). # Returns object or undef, as above. #------------------------------------------------------------------------ sub service { my $class = shift; my $params = defined($_[0]) && ref($_[0]) eq 'HASH' ? shift : { @_ }; return undef unless $class->load($SERVICE); return $SERVICE->new($params) || $class->error( "failed to create context: ", $SERVICE->error ); } #------------------------------------------------------------------------ # constants(\%params) # # Instantiate a new namespace handler for compile time constant folding # (default: Template::Namespace::Constants). # Returns object or undef, as above. #------------------------------------------------------------------------ sub constants { my $class = shift; my $params = defined($_[0]) && ref($_[0]) eq 'HASH' ? shift : { @_ }; return undef unless $class->load($CONSTANTS); return $CONSTANTS->new($params) || $class->error( "failed to create constants namespace: ", $CONSTANTS->error ); } #------------------------------------------------------------------------ # instdir($dir) # # Returns the root installation directory appended with any local # component directory passed as an argument. #------------------------------------------------------------------------ sub instdir { my ($class, $dir) = @_; my $inst = $INSTDIR || return $class->error("no installation directory"); chop $inst while substr($inst,-1) eq '/'; $inst .= "/$dir" if $dir; return $inst; } #======================================================================== # This should probably be moved somewhere else in the long term, but for # now it ensures that Template::TieString is available even if the # Template::Directive module hasn't been loaded, as is the case when # using compiled templates and Template::Parser hasn't yet been loaded # on demand. #======================================================================== #------------------------------------------------------------------------ # simple package for tying $output variable to STDOUT, used by perl() #------------------------------------------------------------------------ package Template::TieString; sub TIEHANDLE { my ($class, $textref) = @_; bless $textref, $class; } sub PRINT { my $self = shift; $$self .= join('', @_); } sub PRINTF { my $self = shift; my $fmt = shift; $$self .= sprintf($fmt, @_); } 1; __END__ =head1 NAME Template::Config - Factory module for instantiating other TT2 modules =head1 SYNOPSIS use Template::Config; =head1 DESCRIPTION This module implements various methods for loading and instantiating other modules that comprise the Template Toolkit. It provides a consistent way to create toolkit components and allows custom modules to be used in place of the regular ones. Package variables such as C<$STASH>, C<$SERVICE>, C<$CONTEXT>, etc., contain the default module/package name for each component (L, L and L, respectively) and are used by the various factory methods (L, L and L) to load the appropriate module. Changing these package variables will cause subsequent calls to the relevant factory method to load and instantiate an object from the new class. =head1 PUBLIC METHODS =head2 load($module) Load a module using Perl's L. Any occurrences of 'C<::>' in the module name are be converted to 'C', and 'C<.pm>' is appended. Returns 1 on success or undef on error. Use C<$class-Eerror()> to examine the error string. =head2 preload() This method preloads all the other C modules that are likely to be used. It is called automatically by the L