Name

Profile —

SYNOPSIS

DESCRIPTION

DIRECTIVE TYPE AND DEFAULT VALUE

Catalog directive

EXAMPLES

No examples are available at this time. We do consider this a problem and will try to supply some.

NOTES

AVAILABILITY

Profile is available in Interchange versions:

4.6.0-5.9.0 (git-head)

SOURCE

Interchange 5.9.0:

Source: lib/Vend/Config.pm
Line 556

['Profile',       'locale',           ''],

Source: lib/Vend/Config.pm
Line 3064 (context shows lines 3064-3128)

sub parse_locale {
my($item,$settings) = @_;
return ($settings || '') unless $settings =~ /[^\d.]/;
$settings = '' if "\L$settings" eq 'default';
my $name;
my ($c, $store);
if(defined $C) {
  $c = $C->{$item} || { };
  $C->{$item . "_repository"} = {}
    unless $C->{$item . "_repository"};
  $store = $C->{$item . "_repository"};
}
else {
  no strict 'refs';
  $c = ${"Global::$item"} || {};
  ${"Global::$item" . "_repository"} = {}
    unless ${"Global::$item" . "_repository"};
  $store = ${"Global::$item" . "_repository"};
}

my ($eval, $safe);
if ($settings =~ s/^\s*([-\w.@]+)(?:\s+)?//) {
  $name = $1;

  undef $eval;
  $settings =~ /^\s*{/
    and $settings =~ /}\s*$/
      and $eval = 1;
  $eval and ! $safe and $safe = new Vend::Safe;
  if(! defined $store->{$name} and $item eq 'Locale') {
      my $past = POSIX::setlocale(POSIX::LC_ALL);
    if(POSIX::setlocale(POSIX::LC_ALL, $name) ) {
      $store->{$name} = POSIX::localeconv();
    }
    POSIX::setlocale(POSIX::LC_ALL, $past);
  }

  my($sethash);
  if ($eval) {
    $sethash = $safe->reval($settings)
      or config_warn("bad Locale setting in %s: %s", $name, $@),
          $sethash = {};
  }
  else {
    $settings =~ s/^\s+//;
    $settings =~ s/\s+$//;
    $sethash = {};
    %{$sethash} = Text::ParseWords::shellwords($settings);
  }
  $c = $store->{$name} || {};
  my $nodefaults = delete $sethash->{MV_LOCALE_NO_DEFAULTS};
  for (keys %{$sethash}) {
    $c->{$_} = $sethash->{$_};
  }
}
else {
  config_error("Bad locale setting $settings.\n");
}

$C->{LastLocale} = $name if $C and $item eq 'Locale';

$store->{$name} = $c unless $store->{$name};

return $c;
}

AUTHORS

Interchange Development Group

SEE ALSO

profile(7ic)

DocBook! Interchange!