Result:
found 771 distributions and 1902 files matching your query ! ( run in 1.946 )


Log-Log4perl-Appender-Gearman

 view release on metacpan or  search on metacpan

inc/Module/Install/Repository.pm  view on Meta::CPAN

            if ($query_repo =~ m!Default Remote: (http://.+)!) {
                return $1;
            }
        }

        open my $handle, '<', '_darcs/prefs/repos' or return;
        while (<$handle>) {
            chomp;
            return $_ if m!^http://!;
        }
    } elsif (-e ".hg") {

 view all matches for this distribution


Log-Procmail

 view release on metacpan or  search on metacpan

t/30edgecase.t  view on Meta::CPAN

    'procmail: No match on "(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)spam@"',
    'procmail: Skipped "* < 256000"',
    'procmail: Match on "< 256000"',
    'procmail: Locking "spamassassin.lock"',
    'procmail: Executing "/usr/local/perl-5.8.7/bin/spamassassin"',
    '[26831] warn: config: created user preferences file: /home/bepi/.spamassassin/user_prefs',
    'procmail: [26829] Fri Oct 28 17:58:30 2005',
    'procmail: Unlocking "spamassassin.lock"',
    'procmail: No match on "^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"',
    'procmail: Locking "/var/spool/mail/bepi.lock"',
    'procmail: Assigning "LASTFOLDER=/var/spool/mail/bepi"',

 view all matches for this distribution


Loop-Sustainable

 view release on metacpan or  search on metacpan

inc/Module/Install/Repository.pm  view on Meta::CPAN

            if ($query_repo =~ m!Default Remote: (http://.+)!) {
                return $1;
            }
        }

        open my $handle, '<', '_darcs/prefs/repos' or return;
        while (<$handle>) {
            chomp;
            return $_ if m!^http://!;
        }
    } elsif (-e ".hg") {

 view all matches for this distribution


M3-ServerView

 view release on metacpan or  search on metacpan

t/06-parser.t  view on Meta::CPAN

is($Test::M3::ServerView::MockView::called_entry_columns, 1);
is($Test::M3::ServerView::MockView::called_add_entry, 0);

$parser->parse(qq{
<h3><b><td align "center">Movex 12.4.3 AMO PROD ServerView: linas1.linserv.se/194.17.14.105:6666</td></b></h3>
<table cellpadding="1" cellspacing="1" BORDER="0"><tr><td><a href="http://linas1.linserv.se:6666/">Home</a></td><td><a href="http://linas1.linserv.se:6666/threads?addr=194.17.14.105&port=6500">Threads</a></td><td><a href="http://linas1.linserv.se:666...
</table>
});

is($Test::M3::ServerView::MockView::called_add_entry, 0);
is($parser->{table_is_data}, 0);

t/06-parser.t  view on Meta::CPAN

$v = Test::M3::ServerView::MockView->new();
$parser = M3::ServerView::Parser->new($v);

$parser->parse(qq{
<h3><b><td align "center">Movex 12.4.3 AMO PROD ServerView: linas1.linserv.se/194.17.14.105:6666</td></b></h3>
<table cellpadding="1" cellspacing="1" BORDER="0"><tr><td><a href="http://linas1.linserv.se:6666/">Home</a></td><td><a href="http://linas1.linserv.se:6666/threads?addr=194.17.14.105&port=6500">Threads</a></td><td><a href="http://linas1.linserv.se:666...
</table>
<hr WIDTH="100%"<p>
<table cellpadding="1" cellspacing="1" WIDTH="100%" BORDER="0"><tr bgcolor="#333333"><th align="left">No</th><th align="left">Type</th><th align="left">Address</th></tr></table>
});

t/06-parser.t  view on Meta::CPAN

$v = Test::M3::ServerView::MockView->new();
$parser = M3::ServerView::Parser->new($v);

$parser->parse(qq{
<h3><b><td align "center">Movex 12.4.3 AMO PROD ServerView: linas1.linserv.se/194.17.14.105:6666</td></b></h3>
<table cellpadding="1" cellspacing="1" BORDER="0"><tr><td><a href="http://linas1.linserv.se:6666/">Home</a></td><td><a href="http://linas1.linserv.se:6666/threads?addr=194.17.14.105&port=6500">Threads</a></td><td><a href="http://linas1.linserv.se:666...
</table>
<hr WIDTH="100%"<p>
<table cellpadding="1" cellspacing="1" WIDTH="100%" BORDER="0"><tr bgcolor="#333333"><th align="left">No</th><th align="left">Type</th><th align="left">Address</th><th>Num</th></tr>
<tr bgcolor="#232323"><td>1</td><td>Supervisor</td><td><a href="http://linas1.linserv.se:6666/super?addr=194.17.14.105&port=6500">linas1.linserv.se:6500</a></td><td>-</td></tr>
<tr bgcolor="#232323"><td>2</td><td>Sub:A</td><td></td><td>1</td></tr></table>

 view all matches for this distribution


MHonArc

 view release on metacpan or  search on metacpan

lib/mhopt.pl  view on Meta::CPAN


    @OtherIdxs = remove_dups(\@OtherIdxs);
    @PerlINC   = remove_dups(\@PerlINC);
    unshift(@INC, @PerlINC);

    ## Set alternative prefs
    if (!$SCAN) {
        readmail::MAILset_alternative_prefs(@MIMEAltPrefs);
        $IsDefault{'MIMEALTPREFS'} = !scalar(@MIMEAltPrefs);
    }

    ## Get other command-line options
    $DBFILE = $opt{'dbfile'} if $opt{'dbfile'};    # Override db

 view all matches for this distribution


MIME-DB

 view release on metacpan or  search on metacpan

lib/MIME/DB.pm  view on Meta::CPAN

$VERSION = 'v1.52.0';
# generation date: 2023-01-31T03:41:54Z
# command: tools\generate.pl
# source url: https://cdn.jsdelivr.net/gh/jshttp/mime-db@v1.52.0/db.json
use constant version => 'v1.52.0';
sub data { {'application/mud+json',{source=>'iana',compressible=>1},'application/vnd.commonspace',{extensions=>['csp'],source=>'iana'},'text/x-handlebars-template',{extensions=>['hbs']},'application/vnd.dbf',{source=>'iana',extensions=>['dbf']},'appl...
1

 view all matches for this distribution


MIME-Types

 view release on metacpan or  search on metacpan

lib/MIME/types.db  view on Meta::CPAN

vnd.oma.bcast.stkm;;;
vnd.oma.cab-address-book+xml;;;
vnd.oma.cab-feature-handler+xml;;;
vnd.oma.cab-pcc+xml;;;
vnd.oma.cab-subs-invite+xml;;;
vnd.oma.cab-user-prefs+xml;;;
vnd.oma.dcd;;;
vnd.oma.dcdc;;;
vnd.oma.drm.risd+xml;;;
vnd.oma.group-usage-list+xml;;;
vnd.oma.lwm2m+cbor;;;

 view all matches for this distribution


Mac-Carbon

 view release on metacpan or  search on metacpan

InternetConfig/InternetConfig.xs  view on Meta::CPAN


It is illegal to call this routine inside a ICBegin/End pair.
Call to configure this connection to IC.
This routine acts as a more general replacement for
ICFindConfigFile and ICFindUserConfigFile.
Set search_prefs to 1 (default) if you want it to search the preferences folder.
Set can_create to 1 if you want it to be able to create a new config.
Set count as the number of valid elements in folders.
Set folders to a pointer to the folders to search.
Setting count to 0 and folders to nil is OK.
Searches the specified folders and then optionally the Preferences folder
in a unspecified manner.

=cut

MacOSRet
ICGeneralFindConfigFile(inst, search_prefs=1, can_create=0, ...)
	ICInstance	inst;
	Boolean		search_prefs;
	Boolean		can_create;
	PREINIT:
	int			i;
	short		count;
	FSSpec		spec;

InternetConfig/InternetConfig.xs  view on Meta::CPAN

		if (!GUSIPath2FSp((char *) SvPV_nolen(ST(i)), &spec) && !GUSIFSpDown(&spec, "\p")) {
			spex[count].vRefNum = spec.vRefNum;
			spex[count].dirID	= spec.parID;
			++count;
		}
	RETVAL = ICGeneralFindConfigFile(inst, search_prefs, can_create, count, (ICDirSpecArrayPtr) spex);
#endif
	OUTPUT:
	RETVAL

=item ICChooseConfig INST

InternetConfig/InternetConfig.xs  view on Meta::CPAN


=item ICGetSeed INST

You do not have to specify a configuration before calling this routine.
You do not have to be inside an ICBegin/End pair to call this routine.
Returns the current seed for the IC prefs database.
This seed changes each time a non-volatile preference is changed.
You can poll this to determine if any cached preferences change.

=cut

 view all matches for this distribution


Mac-iPod-GNUpod

 view release on metacpan or  search on metacpan

GNUpod.pm  view on Meta::CPAN

    for my $plname (@{$self->{plorder}}) {
        my %common = ( name => $plname, type => 0, curid => $num );
        if (my $spl = $self->get_spl($plname)) {
            (my $dat, $num) = Mac::iPod::GNUpod::iTunesDBwrite::r_mpl(
                %common, 
                splprefs => $spl->{pref},
                spldata => $spl->{data}
            );
            $data{playlist} .= $dat;
        }
        else {

 view all matches for this distribution


Mac-iTunes

 view release on metacpan or  search on metacpan

lib/Mac/iTunes/Preferences.pm  view on Meta::CPAN


=head1 SYNOPSIS

	use Mac::iTunes;

	$prefs = Mac::iTunes->preferences;

=head1 DESCRIPTION

**This module is unmaintained**

=cut

use Mac::PropertyList;

sub _default_prefs
	{
	return;
	}

=over 4

lib/Mac/iTunes/Preferences.pm  view on Meta::CPAN

=cut

sub parse_file
	{
	my $class = shift;
	my $filename = shift || _default_prefs;

	open my($fh), $filename or return;
	my $string = do { local $/; <$fh> };
	close $fh;

 view all matches for this distribution


Mail-SpamAssassin-Plugin-Konfidi

 view release on metacpan or  search on metacpan

t/SATest.pm  view on Meta::CPAN

  $scr_pref_args = "-p log/test_default.cf";
  $salearn_cf_args = "-C log/test_rules_copy";
  $salearn_pref_args = "-p log/test_default.cf";
  $scr_test_args = "";
  $salearn_test_args = "";
  $set_test_prefs = 0;
  $default_cf_lines = "
    bayes_path ./log/user_state/bayes
    auto_whitelist_path ./log/user_state/auto-whitelist
  ";

t/SATest.pm  view on Meta::CPAN

    $base = basename $file;
    copy ($file, "log/localrules.tmp/$base")
      or warn "cannot copy $file to log/localrules.tmp/$base";
  }

  copy ("../rules/user_prefs.template", "log/test_rules_copy/99_test_default.cf")
    or die "user prefs copy failed";

  open (PREFS, ">>log/test_rules_copy/99_test_default.cf");
  print PREFS $default_cf_lines;
  close PREFS;

  # create an empty .prefs file
  open (PREFS, ">>log/test_default.cf"); close PREFS;

  mkdir("log/user_state",0755);

  $home = $ENV{'HOME'};

t/SATest.pm  view on Meta::CPAN


  open (OUT, ">log/localrules.tmp/00test.cf") or die;
  print OUT $lines; close OUT;
}

sub tstprefs {
  my $lines = shift;

  $set_test_prefs = 1;

  # TODO: should we use -p, or modify the test_rules_copy/99_test_default.cf?
  # for now, I'm taking the -p route, since we have to be able to test
  # the operation of user-prefs in general, itself.

  open (OUT, ">log/tst.cf") or die;
  print OUT $lines; close OUT;
  $scr_pref_args = "-p log/tst.cf";
}

t/SATest.pm  view on Meta::CPAN

    push(@spamd_args,
      qq{-p}, $spamdport,
    );
  }

  if ($set_test_prefs) {
    warn "oops! SATest.pm: a test prefs file was created, but spamd isn't reading it\n";
  }

  my $spamd_stdout = "log/$testname-spamd.out";
  my $spamd_stderr = "log/$testname-spamd.err";
  my $spamd_stdlog = "log/$testname-spamd.log";

t/SATest.pm  view on Meta::CPAN


  # YUCK, these file/dir names should be some sort of variable, at
  # least we keep their definition in the same file for the moment.
  my %setup_args = ( rules_filename => 'log/test_rules_copy',
		     site_rules_filename => 'log/localrules.tmp',
		     userprefs_filename => 'log/test_default.cf',
		     userstate_dir => 'log/user_state',
		     local_tests_only => 1,
                     # debug => 'all',
		   );

 view all matches for this distribution


Mail-SpamAssassin-Plugin-OpenPGP

 view release on metacpan or  search on metacpan

t/SATest.pm  view on Meta::CPAN

  $scr_pref_args = "-p log/test_default.cf";
  $salearn_cf_args = "-C log/test_rules_copy";
  $salearn_pref_args = "-p log/test_default.cf";
  $scr_test_args = "";
  $salearn_test_args = "";
  $set_test_prefs = 0;
  $default_cf_lines = "
    bayes_path ./log/user_state/bayes
    auto_whitelist_path ./log/user_state/auto-whitelist
  ";

t/SATest.pm  view on Meta::CPAN

    $base = basename $file;
    copy ($file, "log/localrules.tmp/$base")
      or warn "cannot copy $file to log/localrules.tmp/$base";
  }

  copy ("../rules/user_prefs.template", "log/test_rules_copy/99_test_default.cf")
    or die "user prefs copy failed";

  open (PREFS, ">>log/test_rules_copy/99_test_default.cf");
  print PREFS $default_cf_lines;
  close PREFS;

  # create an empty .prefs file
  open (PREFS, ">>log/test_default.cf"); close PREFS;

  mkdir("log/user_state",0755);

  $home = $ENV{'HOME'};

t/SATest.pm  view on Meta::CPAN


  open (OUT, ">log/localrules.tmp/00test.cf") or die;
  print OUT $lines; close OUT;
}

sub tstprefs {
  my $lines = shift;

  $set_test_prefs = 1;

  # TODO: should we use -p, or modify the test_rules_copy/99_test_default.cf?
  # for now, I'm taking the -p route, since we have to be able to test
  # the operation of user-prefs in general, itself.

  open (OUT, ">log/tst.cf") or die;
  print OUT $lines; close OUT;
  $scr_pref_args = "-p log/tst.cf";
}

t/SATest.pm  view on Meta::CPAN

    push(@spamd_args,
      qq{-p}, $spamdport,
    );
  }

  if ($set_test_prefs) {
    warn "oops! SATest.pm: a test prefs file was created, but spamd isn't reading it\n";
  }

  my $spamd_stdout = "log/$testname-spamd.out";
  my $spamd_stderr = "log/$testname-spamd.err";
  my $spamd_stdlog = "log/$testname-spamd.log";

t/SATest.pm  view on Meta::CPAN


  # YUCK, these file/dir names should be some sort of variable, at
  # least we keep their definition in the same file for the moment.
  my %setup_args = ( rules_filename => 'log/test_rules_copy',
		     site_rules_filename => 'log/localrules.tmp',
		     userprefs_filename => 'log/test_default.cf',
		     userstate_dir => 'log/user_state',
		     local_tests_only => 1,
                     # debug => 'all',
		   );

 view all matches for this distribution


Mail-SpamAssassin-SpamCopURI

 view release on metacpan or  search on metacpan

lib/Mail/SpamAssassin/Conf.pm  view on Meta::CPAN

 _CONTACTADDRESS_  contents of the 'report_contact' setting

=head1 USER PREFERENCES

The following options can be used in both site-wide (C<local.cf>) and
user-specific (C<user_prefs>) configuration files to customize how
SpamAssassin handles incoming email messages.

=cut

package Mail::SpamAssassin::Conf;

lib/Mail/SpamAssassin/Conf.pm  view on Meta::CPAN


=item unwhitelist_from add@ress.com

Used to override a default whitelist_from entry, so for example a distribution
whitelist_from can be overridden in a local.cf file, or an individual user can
override a whitelist_from entry in their own C<user_prefs> file.
The specified email address has to match exactly the address previously
used in a whitelist_from line.

e.g.

lib/Mail/SpamAssassin/Conf.pm  view on Meta::CPAN

=item unwhitelist_from_rcvd add@ress.com

Used to override a default whitelist_from_rcvd entry, so for example a
distribution whitelist_from_rcvd can be overridden in a local.cf file,
or an individual user can override a whitelist_from_rcvd entry in
their own C<user_prefs> file.

The specified email address has to match exactly the address previously
used in a whitelist_from_rcvd line.

e.g.

lib/Mail/SpamAssassin/Conf.pm  view on Meta::CPAN


=item unblacklist_from add@ress.com

Used to override a default blacklist_from entry, so for example a distribution blacklist_from
can be overridden in a local.cf file, or an individual user can override a blacklist_from entry
in their own C<user_prefs> file.

e.g.

  unblacklist_from joe@example.com fred@example.com
  unblacklist_from *@spammer.com

lib/Mail/SpamAssassin/Conf.pm  view on Meta::CPAN

=head1 PRIVILEGED SETTINGS

These settings differ from the ones above, in that they are considered
'privileged'.  Only users running C<spamassassin> from their procmailrc's or
forward files, or sysadmins editing a file in C</etc/mail/spamassassin>, can
use them.   C<spamd> users cannot use them in their C<user_prefs> files, for
security and efficiency reasons, unless allow_user_rules is enabled (and
then, they may only add rules from below).

=over 4

=item allow_user_rules { 0 | 1 }		(default: 0)

This setting allows users to create rules (and only rules) in their
C<user_prefs> files for use with C<spamd>. It defaults to off, because
this could be a severe security hole. It may be possible for users to
gain root level access if C<spamd> is run as root. It is NOT a good
idea, unless you have some other way of ensuring that users' tests are
safe. Don't use this unless you are certain you know what you are
doing. Furthermore, this option causes spamassassin to recompile all
the tests each time it processes a message for a user with a rule in
his/her C<user_prefs> file, which could have a significant effect on
server load. It is not recommended.

Note that it is not currently possible to use C<allow_user_rules> to modify an
existing system rule from a C<user_prefs> file with C<spamd>.

=cut

    if (/^allow_user_rules\s+(\d+)$/) {
      $self->{allow_user_rules} = $1+0;

lib/Mail/SpamAssassin/Conf.pm  view on Meta::CPAN

=head1 ADMINISTRATOR SETTINGS

These settings differ from the ones above, in that they are considered 'more
privileged' -- even more than the ones in the SETTINGS section.  No matter what
C<allow_user_rules> is set to, these can never be set from a user's
C<user_prefs> file.

=over 4

=item test SYMBOLIC_TEST_NAME (ok|fail) Some string to test against

 view all matches for this distribution


Mail-SpamAssassin

 view release on metacpan or  search on metacpan

lib/Mail/SpamAssassin.pm  view on Meta::CPAN

  '/usr/etc/spamassassin',
  '/etc/mail/spamassassin',
  '/etc/spamassassin',
);

our @default_prefs_path = (
  '__local_rules_dir__/user_prefs.template',
  '__prefix__/etc/mail/spamassassin/user_prefs.template',
  '__prefix__/share/spamassassin/user_prefs.template',
  '__local_state_dir__/__version__/updates_spamassassin_org/user_prefs.template',
  '__def_rules_dir__/user_prefs.template',
  '/etc/spamassassin/user_prefs.template',
  '/etc/mail/spamassassin/user_prefs.template',
  '/usr/local/share/spamassassin/user_prefs.template',
  '/usr/share/spamassassin/user_prefs.template',
);

our @default_userprefs_path = (
  '~/.spamassassin/user_prefs',
);

our @default_userstate_dir = (
  '~/.spamassassin',
);

lib/Mail/SpamAssassin.pm  view on Meta::CPAN

=item site_rules_filename

The filename/directory to load site-specific spam-identifying rules from.
(optional)

=item userprefs_filename

The filename to load preferences from. (optional)

=item userstate_dir

lib/Mail/SpamAssassin.pm  view on Meta::CPAN

=item config_text

The text of all rules and preferences.  If you prefer not to load the rules
from files, read them in yourself and set this instead.  As a result, this will
override the settings for C<rules_filename>, C<site_rules_filename>,
and C<userprefs_filename>.

=item pre_config_text

Similar to C<config_text>, this text is placed before config_text to allow an
override of config files.

lib/Mail/SpamAssassin.pm  view on Meta::CPAN


=item languages_filename

If you want to be able to use the language-guessing rule
C<UNWANTED_LANGUAGE_BODY>, and are using C<config_text> instead of
C<rules_filename>, C<site_rules_filename>, and C<userprefs_filename>, you will
need to set this.  It should be the path to the B<languages> file normally
found in the SpamAssassin B<rules> directory.

=item local_tests_only

lib/Mail/SpamAssassin.pm  view on Meta::CPAN


If set to 1, any rule files found in the C<site_rules_filename> directory will
be ignored.  *.pre files (used for loading plugins) found in the
C<site_rules_filename> directory will still be used. (default: 0)

=item dont_copy_prefs

If set to 1, the user preferences file will not be created if it doesn't
already exist. (default: 0)

=item save_pattern_hits

lib/Mail/SpamAssassin.pm  view on Meta::CPAN

NOTE: The skip_prng_reseeding feature is implemented in spamd as of 3.4.0
which allows spamd to call srand() right after forking a child process.

=back

If none of C<rules_filename>, C<site_rules_filename>, C<userprefs_filename>, or
C<config_text> is set, the C<Mail::SpamAssassin> module will search for the
configuration files in the usual installed locations using the below variable
definitions which can be passed in.

=over 4

lib/Mail/SpamAssassin.pm  view on Meta::CPAN

  $self->{pers_addr_list_factory} = $fac;
}

###########################################################################

=item $f-E<gt>compile_now ($use_user_prefs, $keep_userstate)

Compile all patterns, load all configuration files, and load all
possibly-required Perl modules.

Normally, Mail::SpamAssassin uses lazy evaluation where possible, but if you

lib/Mail/SpamAssassin.pm  view on Meta::CPAN

this is suboptimal, as each process/thread will have to perform these actions.

Call this function in the master thread or process to perform the actions
straight away, so that the sub-processes will not have to.

If C<$use_user_prefs> is 0, this will initialise the SpamAssassin
configuration without reading the per-user configuration file and it will
assume that you will call C<read_scoreonly_config> at a later point.

If C<$keep_userstate> is true, compile_now() will revert any configuration
options which have a default with I<__userstate__> in it post-init(),

lib/Mail/SpamAssassin.pm  view on Meta::CPAN

by a configuration option.  By default, this is disabled.

=cut

sub compile_now {
  my ($self, $use_user_prefs, $deal_with_userstate) = @_;

  my $timer = $self->time_method("compile_now");

  # Backup default values which deal with userstate.
  # This is done so we can create any new files in, presumably, a temp dir.

lib/Mail/SpamAssassin.pm  view on Meta::CPAN

    while(my($k,$v) = each %{$self->{conf}}) {
      $backup{$k} = $v if (defined $v && !ref($v) && $v =~/__userstate__/);
    }
  }

  $self->init($use_user_prefs);

  # if init() didn't change the value from default, forget about it.
  # if the value is different, remember the new version, and reset the default.
  while(my($k,$v) = each %backup) {
    if ($self->{conf}->{$k} eq $v) {

lib/Mail/SpamAssassin.pm  view on Meta::CPAN


  dbg("ignore: test message to precompile patterns and load modules");

  # tell plugins we are about to send a message for compiling purposes
  $self->call_plugins("compile_now_start",
		      { use_user_prefs => $use_user_prefs,
			keep_userstate => $deal_with_userstate});

  # note: this may incur network access. Good.  We want to make sure
  # as much as possible is preloaded!
  my @testmsg = ("From: ignore\@compiling.spamassassin.taint.org\n", 

lib/Mail/SpamAssassin.pm  view on Meta::CPAN

  }

  # make sure things are ready for scanning
  $self->{bayes_scanner}->force_close() if $self->{bayes_scanner};
  $self->call_plugins("compile_now_finish",
		      { use_user_prefs => $use_user_prefs,
			keep_userstate => $deal_with_userstate});

  # Reset any non-default values to the post-init() version.
  while(my($k,$v) = each %backup) {
    $self->{conf}->{$k} = $v;

lib/Mail/SpamAssassin.pm  view on Meta::CPAN

    "I need to make this message body somewhat long so TextCat preloads\n"x20);

  $self->{lint_rules} = $self->{conf}->{lint_rules} = 1;
  $self->{syntax_errors} = 0;

  my $olddcp = $self->{dont_copy_prefs};
  $self->{dont_copy_prefs} = 1;

  $self->init(1);
  $self->{syntax_errors} += $self->{conf}->{errors};

  $self->{dont_copy_prefs} = $olddcp;       # revert back to previous

  # bug 5048: override settings to ensure a faster lint
  $self->{'conf'}->{'use_auto_welcomelist'} = 0;
  $self->{'conf'}->{'bayes_auto_learn'} = 0;

lib/Mail/SpamAssassin.pm  view on Meta::CPAN

  # if spamd or other forking, wait for spamd_child_init
  if (!$self->{skip_prng_reseeding}) {
    $self->set_global_state_dir();
  }

  #fix spamd reading root prefs file
  if (!defined $use_user_pref) {
    $use_user_pref = 1;
  }

  if (!defined $self->{config_text}) {

lib/Mail/SpamAssassin.pm  view on Meta::CPAN

    }

    if ( $use_user_pref != 0 ) {
      $self->get_and_create_userstate_dir();

      # user prefs file
      my $fname = $self->{userprefs_filename};
      $fname ||= $self->first_existing_path (@default_userprefs_path);

      if (!$self->{dont_copy_prefs}) {
        # bug 4932: if the userprefs path doesn't exist, we need to make it, so
        # just use the last entry in the array as the default path.
        $fname ||= $self->sed_path($default_userprefs_path[-1]);

        my $stat_errn = stat($fname) ? 0 : 0+$!;
        if ($stat_errn == 0 && -f _) {
          # exists and is a regular file, nothing to do
        } elsif ($stat_errn == 0) {
          warn "config: default user preference file $fname is not a regular file\n";
        } elsif ($stat_errn != ENOENT) {
          warn "config: default user preference file $fname not accessible: $!\n";
        } elsif (!$self->create_default_prefs($fname)) {
          warn "config: failed to create default user preference file $fname\n";
        }
      }

      $self->{config_text} .= $self->read_cf($fname, 'user prefs file');
    }
  }

  if ($self->{pre_config_text}) {
    $self->{pre_config_text} .= "\n" unless $self->{pre_config_text} =~ /\n\z/;

lib/Mail/SpamAssassin.pm  view on Meta::CPAN


  # bug 4932: use the last default_userstate_dir entry if none of the others
  # already exist
  $fname ||= $self->sed_path($default_userstate_dir[-1]);

  if (!$self->{dont_copy_prefs}) {
    dbg("config: using \"$fname\" for user state dir");
  }

  # if this is not a dir, not readable, or we are unable to create the dir,
  # this is not (yet) a serious error; in fact, it's not even worth

lib/Mail/SpamAssassin.pm  view on Meta::CPAN


  return $self->first_existing_path(
    map { my $p = $_; $p =~ s{$}{/$filename}; $p } @paths );
}

=item $f-E<gt>create_default_prefs ($filename, $username [ , $userdir ] )

Copy default preferences file into home directory for later use and
modification, if it does not already exist and C<dont_copy_prefs> is
not set.

=cut

sub create_default_prefs {
  # $userdir will only exist if vpopmail config is enabled thru spamd
  # Its value will be the virtual user's maildir
  #
  my ($self, $fname, $user, $userdir) = @_;

  if ($self->{dont_copy_prefs}) {
    return(0);
  }

#  if ($userdir && $userdir ne $self->{user_dir}) {
#    warn "config: hooray! user_dirs don't match! '$userdir' vs '$self->{user_dir}'\n";

lib/Mail/SpamAssassin.pm  view on Meta::CPAN

    # Pass on the value of $userdir for virtual users in vpopmail
    # otherwise it is empty and the user's normal homedir is used
    $self->get_and_create_userstate_dir($userdir);

    # copy in the default one for later editing
    my $defprefs =
      $self->first_existing_path(@Mail::SpamAssassin::default_prefs_path);

    local(*IN,*OUT);
    $fname = Mail::SpamAssassin::Util::untaint_file_path($fname);
    if (!defined $defprefs) {
      warn "config: can not determine default prefs path\n";
    } elsif (!open(IN, "<$defprefs")) {
      warn "config: cannot open $defprefs: $!\n";
    } elsif (!open(OUT, ">$fname")) {
      warn "config: cannot create user preferences file $fname: $!\n";
    } else {
      # former code skipped lines beginning with '#* ', the following copy
      # procedure no longer does so, as it avoids reading line-by-line
      my($inbuf,$nread);
      while ( $nread=read(IN,$inbuf,16384) ) {
        print OUT $inbuf  or die "cannot write to $fname: $!";
      }
      defined $nread  or die "error reading $defprefs: $!";
      undef $inbuf;
      close OUT or die "error closing $fname: $!";
      close IN  or die "error closing $defprefs: $!";

      if (($< == 0) && ($> == 0) && defined($user)) { # chown it
        my ($uid,$gid) = (getpwnam(untaint_var($user)))[2,3];
        unless (chown($uid, $gid, $fname)) {
          warn "config: couldn't chown $fname to $uid:$gid for $user: $!\n";

 view all matches for this distribution


Mail-Toaster

 view release on metacpan or  search on metacpan

lib/Mail/Toaster/Setup.pm  view on Meta::CPAN


	# default query
	#SELECT preference, value FROM _TABLE_ WHERE username = _USERNAME_ OR username = '\@GLOBAL' ORDER BY username ASC
	# global, then domain level
	#SELECT preference, value FROM _TABLE_ WHERE username = _USERNAME_ OR username = '\@GLOBAL' OR username = '@~'||_DOMAIN_ ORDER BY username ASC
	# global overrides user prefs
	#SELECT preference, value FROM _TABLE_ WHERE username = _USERNAME_ OR username = '\@GLOBAL' ORDER BY username DESC
	# from the SA SQL README
	#user_scores_sql_custom_query     SELECT preference, value FROM _TABLE_ WHERE username = _USERNAME_ OR username = '\$GLOBAL' OR username = CONCAT('%',_DOMAIN_) ORDER BY username ASC

	bayes_store_module              Mail::SpamAssassin::BayesStore::SQL

lib/Mail/Toaster/Setup.pm  view on Meta::CPAN

label varchar(255), PRIMARY KEY (owner,nickname), KEY firstname (firstname,lastname));";

        $sth = $self->mysql->query( $dbh, $query );

        $query =
"CREATE TABLE squirrelmail.userprefs ( user varchar(128) DEFAULT '' NOT NULL, prefkey varchar(64) DEFAULT '' NOT NULL, prefval BLOB DEFAULT '' NOT NULL, PRIMARY KEY (user,prefkey))";
        $sth = $self->mysql->query( $dbh, $query );

        $sth->finish;
        return 1;
    }

lib/Mail/Toaster/Setup.pm  view on Meta::CPAN

email varchar(128) DEFAULT '' NOT NULL,
label varchar(255),
PRIMARY KEY (owner,nickname),
KEY firstname (firstname,lastname)
);
CREATE TABLE squirrelmail.userprefs (
user varchar(128) DEFAULT '' NOT NULL,
prefkey varchar(64) DEFAULT '' NOT NULL,
prefval BLOB DEFAULT '' NOT NULL,
PRIMARY KEY (user,prefkey)
);

lib/Mail/Toaster/Setup.pm  view on Meta::CPAN

\$provider_uri     = 'http://www.tnpi.net/wiki/Mail_Toaster';
\$domain                 = '$mailhost';
\$useSendmail            = true;
\$imap_server_type       = 'dovecot';
\$addrbook_dsn = '$dsn';
\$prefs_dsn = '$dsn';
?>
EOCONFIG
      ;

    $self->util->file_write( "config_local.php", lines => [ $string ] );

 view all matches for this distribution


Mail-Webmail-Gmail

 view release on metacpan or  search on metacpan

lib/Mail/Webmail/Gmail.pm  view on Meta::CPAN

        $self->{_err_str} .= "Error: While requesting attachment: '$res->{_request}->{_uri}'.\n";
        return;
    }
}

sub update_prefs {
    my ( $self ) = shift;
    my ( %args ) = (
        view         => 'tl',
        act          => 'prefs',
        search       => 'inbox',
        @_, );

    unless ( check_login( $self ) ) { return };

lib/Mail/Webmail/Gmail.pm  view on Meta::CPAN

    reply_to           = ( '', string value up to 320 Characters )
    signature          = ( '', string value up to 1000 Characters )

Changing preferences can be accomplished by simply sending the preference(s) that you want to change, and the new value.

    $gmail->update_prefs( indicators => 0, reply_to => 'test@test.com' );

To delete display_name, reply_to, or signature simply send a blank string as in the following example.

    $gmail->update_prefs( signature => '' );

=head2 STARRING A MESSAGE

To star or unstar a message use these examples

lib/Mail/Webmail/Gmail.pm  view on Meta::CPAN

        }
    }
    ###

    ### Update preferences
        if ( $gmail->update_prefs( signature => 'Test Sig.', max_page_size => 100 ) ) {
            print "Preferences Updated.\n";
        } else {
            print "Unable to update preferences.\n";
        }
    ###

 view all matches for this distribution


Markdown-Foswiki

 view release on metacpan or  search on metacpan

inc/Module/Install/Repository.pm  view on Meta::CPAN

            if ($query_repo =~ m!Default Remote: (http://.+)!) {
                return $1;
            }
        }

        open my $handle, '<', '_darcs/prefs/repos' or return;
        while (<$handle>) {
            chomp;
            return $_ if m!^http://!;
        }
    } elsif (-e ".hg") {

 view all matches for this distribution


MasonX-Resolver-Polyglot

 view release on metacpan or  search on metacpan

lib/MasonX/Resolver/Polyglot.pm  view on Meta::CPAN

    # I suspect this is wasteful.
    my $r = Apache->request;
    
    $DEBUG && $r->log_error(qq(URI:) . $r->uri . qq(, path: $path)); 
    $DEBUG && $r->log_error(qq(Header says: ), $r->header_in('Accept-Language'));
    # Get a ranked list of language prefs based on the Accept-Language and URI
    # everything in get_langs will need an $r
    $self->{r} = $r;
    my @langs = @{$self->get_langs(\$path)};
    $DEBUG && $r->log_error("Languages Accepted: ", join(",", @langs));
    delete $self->{r};

 view all matches for this distribution


Math-Calc-Units

 view release on metacpan or  search on metacpan

Units/Convert/Base.pm  view on Meta::CPAN

#
# Maps a unit name (eg week) to a score. Higher scores are more likely
# to be chosen.
sub pref_score {
    my ($self, $unitName) = @_;
    my $prefs = $self->get_prefs();
    my $specific = $prefs->{$unitName};
    return defined($specific) ? $specific : $prefs->{default};
}

# get_prefs : void -> { unit name => score }
#
# Return a map of unit names to their score, higher scores meaning
# they're more likely to be chosen.
sub get_prefs {
    return { default => 0.1 };
}

sub get_ranges {
    return { default => [ 1, undef ] };

 view all matches for this distribution


Math-Round-Fair

 view release on metacpan or  search on metacpan

inc/Module/Install/Repository.pm  view on Meta::CPAN

            if ($query_repo =~ m!Default Remote: (http://.+)!) {
                return $1;
            }
        }

        open my $handle, '<', '_darcs/prefs/repos' or return;
        while (<$handle>) {
            chomp;
            return $_ if m!^http://!;
        }
    } elsif (-e ".hg") {

 view all matches for this distribution


Meta

 view release on metacpan or  search on metacpan

Meta/Projects/Develop/develop_rc.pl  view on Meta::CPAN

$opts->def_bool("cdch","do you want to cd to your change on login",1,\$cdch);
$opts->def_bool("colo","do you want ls baseline coloring",0,\$colo);
$opts->def_bool("lsco","do you want ls standard coloring",0,\$lsco);
$opts->def_bool("long","do you want --long opt for ls coloring",1,\$long);
$opts->def_bool("pete","do you want aegis type (Peter) shortcuts (only valid for bash)",0,\$pete);
$opts->def_bool("nprj","do you want to set your AEGIS_PROJECT from your aegis prefs",1,\$nprj);
$opts->def_bool("nchn","do you want to set your AEGIS_CHANGE from your aegis prefs",1,\$nchn);
$opts->def_bool("blxx","do you want to set the BL environment variable to point to the baseline",1,\$blxx);
$opts->def_bool("chxx","do you want to set the CH environment variable to point to the change",1,\$chxx);
$opts->def_bool("ps1x","do you want to set the PS1 environment variable for the shell",1,\$ps1x);
$opts->def_bool("page","do you want to set the PAGER environment varialbe",1,\$page);
$opts->def_bool("manp","do you want to set the MANPAGER variable",1,\$manp);

Meta/Projects/Develop/develop_rc.pl  view on Meta::CPAN


do you want aegis type (Peter) shortcuts (only valid for bash)

=item B<nprj> (type: bool, default: 1)

do you want to set your AEGIS_PROJECT from your aegis prefs

=item B<nchn> (type: bool, default: 1)

do you want to set your AEGIS_CHANGE from your aegis prefs

=item B<blxx> (type: bool, default: 1)

do you want to set the BL environment variable to point to the baseline

 view all matches for this distribution


Method-Cumulative

 view release on metacpan or  search on metacpan

inc/Module/Install/Repository.pm  view on Meta::CPAN

            if ($query_repo =~ m!Default Remote: (http://.+)!) {
                return $1;
            }
        }

        open my $handle, '<', '_darcs/prefs/repos' or return;
        while (<$handle>) {
            chomp;
            return $_ if m!^http://!;
        }
    } elsif (-e ".hg") {

 view all matches for this distribution


MiniPAN

 view release on metacpan or  search on metacpan

doc/slides/mkpres.pl  view on Meta::CPAN


sub outdent {
    local($_) = @_;
    s/\s+$//s;
    s/^\s*?\n//s;
    my($prefix, @prefs) = m/^(\s*)/mg;
    foreach (@prefs) {
        $prefix = $_ if length($_) < length($prefix);
    }
    s/^$prefix//mg;
    return $_;
}

 view all matches for this distribution


Model3D-Poser-GetStringRes

 view release on metacpan or  search on metacpan

lib/Model3D/Poser/GetStringRes.pm  view on Meta::CPAN

$stringRes->[1032]->[60] = 'Runtime\\Libraries\\props\\';
$stringRes->[1032]->[61] = 'Hands.plb';
$stringRes->[1032]->[62] = 'Faces.plb';
$stringRes->[1032]->[63] = 'Hair.plb';
$stringRes->[1032]->[64] = 'Props.plb';
$stringRes->[1032]->[65] = 'Runtime\\prefs\\previousState.pz3';
$stringRes->[1032]->[66] = 'Runtime\\prefs\\preferredState.pz3';
$stringRes->[1032]->[67] = 'Runtime\\Prefs\\';
$stringRes->[1032]->[68] = 'Runtime\\textures\\Poser 3 Textures\\';
$stringRes->[1032]->[69] = 'Runtime\\Plugins\\';
$stringRes->[1032]->[70] = 'Runtime\\dots';
$stringRes->[1032]->[71] = 'Runtime\\dots\\cameraDot_%ld.cm2';

 view all matches for this distribution


Module-Build-Pluggable

 view release on metacpan or  search on metacpan

lib/Module/Build/Pluggable/Repository.pm  view on Meta::CPAN

            if ($query_repo =~ m!Default Remote: (http://.+)!) {
                return $1;
            }
        }

        open my $handle, '<', '_darcs/prefs/repos' or return;
        while (<$handle>) {
            chomp;
            return $_ if m!^http://!;
        }
    } elsif (-e ".hg") {

 view all matches for this distribution


Module-Collect

 view release on metacpan or  search on metacpan

inc/Module/Install/Repository.pm  view on Meta::CPAN

            if ($query_repo =~ m!Default Remote: (http://.+)!) {
                return $1;
            }
        }

        open my $handle, '<', '_darcs/prefs/repos' or return;
        while (<$handle>) {
            chomp;
            return $_ if m!^http://!;
        }
    } elsif (-e "$ENV{HOME}/.svk") {

 view all matches for this distribution


Module-CoreList-List

 view release on metacpan or  search on metacpan

lib/Module/CoreList/List/5.pod  view on Meta::CPAN


=item * L<CPAN::DeferredCode> (undef)

=item * L<CPAN::Distribution> (undef)

=item * L<CPAN::Distroprefs> (undef)

=item * L<CPAN::Distrostatus> (undef)

=item * L<CPAN::Exception::RecursiveDependency> (undef)

 view all matches for this distribution


Module-CoreList

 view release on metacpan or  search on metacpan

lib/Module/CoreList.pm  view on Meta::CPAN

            'CGI::Fast'             => '1.07',
            'CGI::Util'             => '1.5_01',
            'CPAN'                  => '1.9301',
            'CPAN::Debug'           => '5.5',
            'CPAN::DeferedCode'     => '5.50',
            'CPAN::Distroprefs'     => '6',
            'CPAN::FirstTime'       => '5.5_01',
            'CPAN::HandleConfig'    => '5.5',
            'CPAN::Kwalify'         => '5.50',
            'CPAN::Nox'             => '5.50',
            'CPAN::Queue'           => '5.5',

lib/Module/CoreList.pm  view on Meta::CPAN

            'CPAN::CacheMgr'        => '5.5',
            'CPAN::Complete'        => '5.5',
            'CPAN::Debug'           => '5.5',
            'CPAN::DeferredCode'    => '5.50',
            'CPAN::Distribution'    => '1.93',
            'CPAN::Distroprefs'     => '6',
            'CPAN::Distrostatus'    => '5.5',
            'CPAN::Exception::RecursiveDependency'=> '5.5',
            'CPAN::Exception::blocked_urllist'=> '1.0',
            'CPAN::Exception::yaml_not_installed'=> '5.5',
            'CPAN::FTP'             => '5.5001',

lib/Module/CoreList.pm  view on Meta::CPAN

            'B::Deparse'            => '1.26',
            'CPAN'                  => '2.04',
            'CPAN::Bundle'          => '5.5001',
            'CPAN::Complete'        => '5.5001',
            'CPAN::Distribution'    => '2.01',
            'CPAN::Distroprefs'     => '6.0001',
            'CPAN::FirstTime'       => '5.5305',
            'CPAN::Meta'            => '2.140640',
            'CPAN::Meta::Converter' => '2.140640',
            'CPAN::Meta::Feature'   => '2.140640',
            'CPAN::Meta::History'   => '2.140640',

lib/Module/CoreList.pm  view on Meta::CPAN

    'CPAN::CacheMgr'        => 'cpan',
    'CPAN::Complete'        => 'cpan',
    'CPAN::Debug'           => 'cpan',
    'CPAN::DeferredCode'    => 'cpan',
    'CPAN::Distribution'    => 'cpan',
    'CPAN::Distroprefs'     => 'cpan',
    'CPAN::Distrostatus'    => 'cpan',
    'CPAN::Exception::RecursiveDependency'=> 'cpan',
    'CPAN::Exception::blocked_urllist'=> 'cpan',
    'CPAN::Exception::yaml_not_installed'=> 'cpan',
    'CPAN::Exception::yaml_process_error'=> 'cpan',

lib/Module/CoreList.pm  view on Meta::CPAN

    'CPAN::CacheMgr'        => undef,
    'CPAN::Complete'        => undef,
    'CPAN::Debug'           => undef,
    'CPAN::DeferredCode'    => undef,
    'CPAN::Distribution'    => undef,
    'CPAN::Distroprefs'     => undef,
    'CPAN::Distrostatus'    => undef,
    'CPAN::Exception::RecursiveDependency'=> undef,
    'CPAN::Exception::blocked_urllist'=> undef,
    'CPAN::Exception::yaml_not_installed'=> undef,
    'CPAN::Exception::yaml_process_error'=> undef,

 view all matches for this distribution


Module-Generic

 view release on metacpan or  search on metacpan

lib/Module/Generic.pm  view on Meta::CPAN

        }
    }
    my $ref = ${"${class}\::HAS_B64"};
    return( '' ) if( !scalar( keys( %$ref ) ) );
    
    my $prefs = [];
    if( $val eq 'Crypt::Misc' || $val eq 'CryptX' )
    {
        push( @$prefs, qw( Crypt::Misc MIME::Base64 ) );
    }
    # for any other value, including 'MIME::Base64'
    else
    {
        push( @$prefs, qw( MIME::Base64 Crypt::Misc ) );
    }
    
    foreach my $mod ( @$prefs )
    {
        if( exists( $ref->{ $mod } ) && $self->_load_class( $mod ) )
        {
            return( $ref->{ $mod } );
        }

 view all matches for this distribution


Module-Install-Bugtracker

 view release on metacpan or  search on metacpan

inc/Module/Install/Repository.pm  view on Meta::CPAN

            if ($query_repo =~ m!Default Remote: (http://.+)!) {
                return $1;
            }
        }

        open my $handle, '<', '_darcs/prefs/repos' or return;
        while (<$handle>) {
            chomp;
            return $_ if m!^http://!;
        }
    } elsif (-e ".hg") {

 view all matches for this distribution


( run in 1.946 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )