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


Form-Sensible

 view release on metacpan or  search on metacpan

lib/Form/Sensible/Renderer/HTML/RenderedForm.pm  view on Meta::CPAN

A hint that is specific to the HTML renderer is C<stash_vars>, this should be
a hash and will be passed to the templates as they are rendered.

    {
        stash_vars => {
            user_prefs => $user_prefs
        }
    }

For example in the this case, C<$user_prefs> could be accessed in any
of the templates (form_start.tt, text.tt etc) as C<[% user_prefs %]>.

Another is C<field_wrapper> which should be the name of a template to act
as a wrapper for each individual field template. This can be useful if each
field has common HTML and only the actual field element changes. For example
in this case:

 view all matches for this distribution


FormValidator-LazyWay

 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


FormValidator-Simple-Plugin-V8

 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


FreeHAL

 view release on metacpan or  search on metacpan

AI/FreeHAL/Engine.pm  view on Meta::CPAN


    $i = 0;

    my $cpu_limit = 100;

    open my $preferences, '<', '../../global_prefs_override.xml'
      or say "Preferences not found!";
    while ( defined( my $line = <$preferences> ) ) {
        if ( $line =~ /cpu_usage_limit/ ) {
            $line =~ m/[>](.*?)\./;
            $cpu_limit = $1 if $1;

 view all matches for this distribution


FusionInventory-Agent

 view release on metacpan or  search on metacpan

resources/macos/firewall/launctl_list.txt  view on Meta::CPAN

-	0	com.apple.bsd.dirhelper
93	0	com.apple.revisiond
-	0	com.apple.smb.preferences
-	0	com.apple.findmymacd
-	0	com.apple.cloudfamilyrestrictionsd
115	0	com.apple.cfprefsd.xpc.daemon
-	0	com.apple.Localization.SetDefaultsService
-	0	com.apple.unmountassistant.sysagent
-	0	com.apple.uninstalld
-	0	com.apple.xpc.smd
-	0	com.apple.gkreport

 view all matches for this distribution


GTM

 view release on metacpan or  search on metacpan

lib/GTM.pm  view on Meta::CPAN


=cut

BEGIN {
    use base 'Exporter';
    our @EXPORT_OK = qw(set_busy output %override save_prefs);
    our @EXPORT    = ();
}

use GTM::Run ();

lib/GTM.pm  view on Meta::CPAN


}

my $rcfile = my_home File::HomeDir . "/.gtmrc";

sub save_prefs () {
    open my $fh, ">", $rcfile
      or do { warn "can't create '$rcfile': $!"; return; };

    while (my ($k, $v) = each %win_size) {
        print $fh "# win=$k w=$v->[0] h=$v->[1]\n";

lib/GTM.pm  view on Meta::CPAN

        $v =~ s/"/\\"/g;
        print $fh "$k=\"$v\"\nexport $k\n\n";
    }
}

sub load_prefs () {
    open my $fh, "<", $rcfile
      or do { warn "can't open '$rcfile': $!"; return; };
    while (my $line = <$fh>) {
        if ($line =~ /^#\s+win=(\w+)\s+w=(\d+)\s+h=(\d+)$/) {
            my ($window, $win_width, $win_height) = ($1, $2, $3);

lib/GTM.pm  view on Meta::CPAN

            delete $override{$k};
            $override{$k} = $v if length $v;
        }

        get_gtm_version ();
        save_prefs;
    }
    $dialog->destroy;
}

my $menu_tree = [

lib/GTM.pm  view on Meta::CPAN


    _Variables => {
                   item_type => '<Branch>',
                   children  => [
                       '_Edit all variables' => {callback => sub { edit_environment (@gtm_variables) },},
                       '_Clear all overrides' => {callback => sub { %override = (); save_prefs(); },},
                       Separator => {item_type => '<Separator>',},
                               ],
                  },

    _Database => {

lib/GTM.pm  view on Meta::CPAN

    $v->pack_start ($button,         0, 0, 0);

    $v->add                       ($main_scroll);
    $main_window->add             ($v);
    $main_window->add_accel_group ($menu->{accel_group});
    load_prefs;
    set_busy (0);
    get_gtm_version();
    $main_window;
}

 view all matches for this distribution


Game-TextPacMonster

 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


Games-Axmud

 view release on metacpan or  search on metacpan

lib/Games/Axmud/Strip.pm  view on Meta::CPAN


            $self->winObj->visibleSession->pseudoCmd('editquick', $mode);
        });
        $menuColumn_edit->append($menuItem_quickPrefs);
        # (Requires a visible session whose status is 'connected' or 'offline')
        $self->ivAdd('menuItemHash', 'edit_quick_prefs', $menuItem_quickPrefs);

        my $menuItem_clientPrefs = Gtk3::ImageMenuItem->new(
            $axmud::SCRIPT . ' _preferences...',
        );
        my $menuImg_clientPrefs = Gtk3::Image->new_from_stock('gtk-preferences', 'menu');

lib/Games/Axmud/Strip.pm  view on Meta::CPAN


            $self->winObj->visibleSession->pseudoCmd('editclient', $mode);
        });
        $menuColumn_edit->append($menuItem_clientPrefs);
        # (Requires a visible session whose status is 'connected' or 'offline')
        $self->ivAdd('menuItemHash', 'edit_client_prefs', $menuItem_clientPrefs);

        my $menuItem_sessionPrefs = Gtk3::ImageMenuItem->new('_Session preferences...');
        my $menuImg_sessionPrefs = Gtk3::Image->new_from_stock('gtk-preferences', 'menu');
        $menuItem_sessionPrefs->set_image($menuImg_sessionPrefs);
        $menuItem_sessionPrefs->signal_connect('activate' => sub {

            $self->winObj->visibleSession->pseudoCmd('editsession', $mode);
        });
        $menuColumn_edit->append($menuItem_sessionPrefs);
        # (Requires a visible session whose status is 'connected' or 'offline')
        $self->ivAdd('menuItemHash', 'edit_session_prefs', $menuItem_sessionPrefs);

        $menuColumn_edit->append(Gtk3::SeparatorMenuItem->new());   # Separator

        my $menuItem_editWorld = Gtk3::ImageMenuItem->new('Edit current _world...');
        my $menuImg_editWorld = Gtk3::Image->new_from_stock('gtk-edit', 'menu');

 view all matches for this distribution


Games-Minesweeper

 view release on metacpan or  search on metacpan

lib/Games/Minesweeper.pm  view on Meta::CPAN

my $audio = 0;
my $mc;
my $game_over = 0;
my $menu;

sub save_prefs () {
   my $hd = my_home File::HomeDir;
   my $rcfile = "$hd/.minesweeperrc\0";
   my $fh;
   open $fh, ">", $rcfile
      or do { warn "can't create $rcfile: $!\n"; return; };
   print $fh "$field_width $field_height $field_mines $audio\n";
}

sub load_prefs () {
   my $hd = my_home File::HomeDir;
   my $rcfile = "$hd/.minesweeperrc\0";
   my $fh;
   open $fh, "<", $rcfile
      or do { warn "can't open $rcfile: $!"; return; };

lib/Games/Minesweeper.pm  view on Meta::CPAN

                         _Audio => { callback =>  sub { $audio = 0 + $menu->get_widget ('/Game/Audio')->get_active; },
                                     item_type => '<CheckItem>', 
                         },
                         Separator => { item_type => '<Separator>',
                         },
                         E_xit => { callback => sub { save_prefs; main_quit Gtk2; },
                                    accelerator => '<Alt>X',
                         },
                 ],
           },
           "_?" => { 

lib/Games/Minesweeper.pm  view on Meta::CPAN

      $f1->add ($vb);
      $v->add ($menu->{widget});
      $w->add_accel_group ($menu->{accel_group});
      $v->pack_start ($f1, 1, 0, 0);
      $w->add ($v);
      $w->signal_connect( destroy => sub { save_prefs; main_quit Gtk2; });
      $w->signal_connect( destroy => \&cleanup_cb);
      $d->realize;
      load_prefs;
      restart;
      $w;
}
1;

 view all matches for this distribution


Games-Tournament-Swiss

 view release on metacpan or  search on metacpan

lib/Games/Tournament/Swiss/Procedure/FIDE.pm  view on Meta::CPAN

        my @roles     = map { $_->preference->role } @pair;
        my @strengths = map { $_->preference->strength } @pair;
        my $rule;
        if ( not $roles[0] and not $roles[1] ) {
            ( $roles[0], $roles[1] ) = $self->randomRole;
            $rule = 'No prefs';
        }
        if ( not $roles[0] ) {
            $roles[0] =
                ( $roles[1] eq (ROLES)[1] )
              ? (ROLES)[0]

 view all matches for this distribution


Genezzo-Contrib-Clustered

 view release on metacpan or  search on metacpan

lib/Genezzo/Contrib/Clustered.pm  view on Meta::CPAN

    $self->{inReadBlock} = 0;

    $self->{init_done} = 0;

    $self->{dict} = shift @_;
    # greet $self->{dict}->{prefs};

    return bless $self, $class;

}

 view all matches for this distribution


Genezzo

 view release on metacpan or  search on metacpan

lib/Genezzo/Dict.pm  view on Meta::CPAN

        $self->{fhdefs} = {};
    }
    # get all actual file header info
    $self->{fileheaderinfo} = {}; # set when load SYSTEM tablespace
    # get dictionary preference table info
    $self->{prefs} = {};

    $self->{basichelp} = Genezzo::BasicHelp->new();

    # for raw filesystems we pretend /dev/raw is the home directory
    # and raw1 is the file.

lib/Genezzo/Dict.pm  view on Meta::CPAN

                         all     => "dump dictionary table structs",
                         help    => "this message",
                         table   => "names of dictionary tables",
                         ts      => "dump tablespace structs (very long)",
                         tstab   => "dump loaded tablespace tables (short)",
                         prefs   => "startup prefs",
                         bc      => "buffer cache (per tablespace)",
                         tsidx   => "tablespace index information",
                         files   => "file headers and extent info"
                         );

lib/Genezzo/Dict.pm  view on Meta::CPAN

                    }
                }
            }
        }
    }
    elsif ($params[0] =~ m/^PREF/i) # dump prefs
    {
        print Dumper($self->{prefs});
        print Dumper($self->{fileheaderinfo});
        print Dumper($self->{unknown_defs});
        print Dumper($self->{fhdefs});
    }
    elsif ($params[0] =~ m/^BC/i) # dump buffer cache

lib/Genezzo/Dict.pm  view on Meta::CPAN


    # if makepref1 is set, build the preferences table, else use the
    # existing one in default.dbf
    if ($makepref1)
    {
        my %basicprefs = (
                          blocksize    => $self->{blocksize},
                          home         => $self->{gnz_home},
                          default_file => $deffile,
                          bc_size      => 40,
                          automount    => "TRUE", # "FALSE",

lib/Genezzo/Dict.pm  view on Meta::CPAN

                      "init"
                      ];

        my $getcol = $corecolnum{"_pref1"};
        
        while (my ($kk, $vv) = each (%basicprefs))
        { 
            $rowarr->[$getcol->{pref_key}]   = $kk;
            $rowarr->[$getcol->{pref_value}] = $vv;
            unless (defined($realtie->HPush($rowarr)))
            {

lib/Genezzo/Dict.pm  view on Meta::CPAN


    my $ts1 = Genezzo::Tablespace->new(name      => $tsname,
                                       tsid      => 1,
                                       gnz_home  => $self->{gnz_home},
                                       blocksize => $self->{blocksize},
                                       bc_size   => $self->{prefs}->{bc_size},
                                       GZERR     => $self->{GZERR},
                                       dict      => $self);
    $tshref->{$tsname} = {
        tsref => $ts1,
    };

lib/Genezzo/Dict.pm  view on Meta::CPAN


sub doDictPreLoad 
{
    my $self = shift;
    
    whisper "load prefs...\n";
    
    my $tsname = "SYSTEM";
    my $deffile = $self->{dbfile};
    my $deffilsize = $self->{dbsize};
    

lib/Genezzo/Dict.pm  view on Meta::CPAN

        unless ($self->_TSForceFile1("SYSTEM", "_pref1"));

    # XXX XXX: create a hash of methods associated with pref1, use the
    # key/val pairs to reset system preferences

    $self->{prefs} = {};

    my $hashi = $self->_get_table (tname => '_pref1') ;

    # XXX XXX: replace with filter and SQLFetch...
    while ( my ($kk, $vv) = each ( %{$hashi}))
    { 
        my $getcol  = $corecolnum{"_pref1"};
        my $pref_key = $vv->[$getcol->{pref_key}];
        my $pref_val = $vv->[$getcol->{pref_value}];

        $self->{prefs}->{$pref_key} = $pref_val;

        if ($pref_key =~ m/bc_size/)
        {
            my $tshref = $self->{tablespaces};
            my $tsname = 'SYSTEM';

lib/Genezzo/Dict.pm  view on Meta::CPAN

                           gnz_home  => $self->{gnz_home},
                           blocksize => $self->{blocksize},
                           GZERR     => $self->{GZERR},
                           dict      => $self);

        if (exists($self->{prefs})
            && exists($self->{prefs}->{bc_size}))
        {
            # set the buffer cache size if prefs are loaded
            $tspace_args{bc_size} = $self->{prefs}->{bc_size}
        }

        my $ts1 = Genezzo::Tablespace->new(%tspace_args);

        # XXX: need to perform special initialization for SYSTEM

lib/Genezzo/Dict.pm  view on Meta::CPAN

                           gnz_home  => $self->{gnz_home},
                           blocksize => $blocksize,
                           GZERR     => $self->{GZERR},
                           dict      => $self);

        if (exists($self->{prefs})
            && exists($self->{prefs}->{bc_size}))
        {
            # set the buffer cache size if prefs are loaded
            $tspace_args{bc_size} = $self->{prefs}->{bc_size}
        }

        $ts1 = Genezzo::Tablespace->new(%tspace_args);

        unless ($ts1->TSLoad(loadtype => "NORMAL"))

 view all matches for this distribution


Gentoo-Probe

 view release on metacpan or  search on metacpan

t/sandbox/pkg-files.lst  view on Meta::CPAN

/usr/share/doc/dnsquery-0.60.4/TODO.gz
/usr/bin/gtkskan
/usr/share/gtkskan/stop.xpm
/usr/share/gtkskan/go.xpm
/usr/share/gtkskan/exit.xpm
/usr/share/gtkskan/prefs.xpm
/usr/share/gtkskan/netfound.wav
/usr/share/doc/gtkskan-0.2/CREDITS.gz
/usr/share/doc/gtkskan-0.2/LICENSE.gz
/usr/share/doc/gtkskan-0.2/README.gz
/usr/sbin/iwconfig

 view all matches for this distribution


Gentoo-Util-VirtualDepend

 view release on metacpan or  search on metacpan

share/module-to-gentoo.csv  view on Meta::CPAN

CPAN::CacheMgr,virtual/perl-CPAN
CPAN::Complete,virtual/perl-CPAN
CPAN::Debug,virtual/perl-CPAN
CPAN::DeferredCode,virtual/perl-CPAN
CPAN::Distribution,virtual/perl-CPAN
CPAN::Distroprefs,virtual/perl-CPAN
CPAN::Distroprefs::Iterator,virtual/perl-CPAN
CPAN::Distroprefs::Pref,virtual/perl-CPAN
CPAN::Distroprefs::Result,virtual/perl-CPAN
CPAN::Distroprefs::Result::Error,virtual/perl-CPAN
CPAN::Distroprefs::Result::Fatal,virtual/perl-CPAN
CPAN::Distroprefs::Result::Success,virtual/perl-CPAN
CPAN::Distroprefs::Result::Warning,virtual/perl-CPAN
CPAN::Distrostatus,virtual/perl-CPAN
CPAN::Eval,virtual/perl-CPAN
CPAN::Exception::RecursiveDependency,virtual/perl-CPAN
CPAN::Exception::RecursiveDependency::na,virtual/perl-CPAN
CPAN::Exception::blocked_urllist,virtual/perl-CPAN

 view all matches for this distribution


Geo-Coordinates-Converter-Format-Geohash

 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


Geo-Coordinates-Converter

 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


Geo-EOP

 view release on metacpan or  search on metacpan

lib/Geo/EOP.pm  view on Meta::CPAN

# list all available versions
# It is a pity that not all schema use the same prefixes... sometimes,
# the dafault prefix is used... therefore, we have to configure all that
# manually.

my @stdprefs =   # will be different in the future
 ( sar => NS_SAR_ESA
 , atm => NS_ATM_ESA
 , gml => NS_GML_311
 );

my %info =
  ( '1.0'     =>
      { prefixes    => {hma => NS_HMA_ESA, ohr => NS_OHR_ESA, @stdprefs}
      , eop_schemas => [ 'hma1.0/{eop,sar,opt,atm}.xsd' ]
      , gml_schemas => [ 'eop1.1/gmlSubset.xsd' ]
      , gml_version => '3.1.1eop'
      }

  , '1.1'     =>
      { prefixes    => {eop => NS_EOP_ESA, opt => NS_OPT_ESA, @stdprefs}
      , eop_schemas => [ 'eop1.1/{eop,sar,opt,atm}.xsd' ]
      , gml_schemas => [ 'eop1.1/gmlSubset.xsd' ]
      , gml_version => '3.1.1eop'
      }

  , '1.2beta' =>
      { prefixes    => {eop => NS_EOP_ESA, opt => NS_OPT_ESA, @stdprefs}
      , eop_schemas => [ 'eop1.2beta/{eop,sar,opt,atm}.xsd' ]
      , gml_schemas => [ 'eop1.1/gmlSubset.xsd' ]
      , gml_version => '3.1.1eop'
      }

  , '1.2.1' =>
      { prefixes    => {eop => NS_EOP_ESA, opt => NS_OPT_ESA, @stdprefs}
      , eop_schemas => [ 'eop1.2.1/{eop,sar,opt,atm}.xsd' ]
      , gml_schemas => [ 'eop1.2.1/gmlSubset.xsd' ]
      , gml_version => '3.1.1eop'
      }

 view all matches for this distribution


Geo-Google-StaticMaps-Navigation

 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


GeoHash

 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


Geography-JapanesePrefectures-Walker

 view release on metacpan or  search on metacpan

lib/Geography/JapanesePrefectures/Walker.pm  view on Meta::CPAN

}

sub _encode_prefectures_infos {
    my $self = shift;

    my $prefs = Geography::JapanesePrefectures->prefectures_infos;

    my $visitor = Data::Visitor::Callback->new(                                                                                                    
        plain_value => sub {
            Encode::from_to($_, 'utf8', $self->{encoding}, 1);
        }
    ); 
    $visitor->visit($prefs);

    return $prefs;
}

sub prefectures_infos { shift->{_geo_data} }

sub prefectures {

lib/Geography/JapanesePrefectures/Walker.pm  view on Meta::CPAN


in your script:

    use Geography::JapanesePrefectures::Walker;
    my $g = Geography::JapanesePrefectures::Walker->new('euc-jp');
    my $prefs = $g->prefectures;

=head1 METHODS

=head2 new

 view all matches for this distribution


Geohash

 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


Getopt-ExPar

 view release on metacpan or  search on metacpan

Getopt/ExPar.pm  view on Meta::CPAN

#### Method: new
#######################################################################
# Contructor routine.
#######################################################################
sub _new {
  my($class, $prefs) = @_;

  #Initilize $self
  my($self) = {};
  $self->{'prefs'} = {
    'ooRoutines' => 1,
    'development_check' => 0,
    'abbreviations' => 0,
    'filelistpref' => -1,
    'ignorecase' => 0,

Getopt/ExPar.pm  view on Meta::CPAN

    'intermingledFiles' => 0,
  };
  $self->{'parameter'} = {};
  $self->{'aliasnamehash'} = {};

  #Overwrite elements in $self as specified by $prefs hash
  &__parse_prefs($self, $prefs) if ((defined $prefs) and (ref($prefs) eq 'HASH'));

  #Grab predefined types: integer, real, key, etc.
  &__assert_predefined_types($self);

  #Bless object into class and return

Getopt/ExPar.pm  view on Meta::CPAN

#Preference methods
sub _ooRoutines {
  my($self) = shift;
  my($value) = shift;
  if (defined $value) {
    $self->{'prefs'}->{'ooRoutines'} = $value;
  } else {
    return $self->{'prefs'}->{'ooRoutines'};
  }
}
sub _development_check {
  my($self) = shift;
  my($value) = shift;
  if (defined $value) {
    $self->{'prefs'}->{'development_check'} = $value;
  } else {
    return $self->{'prefs'}->{'development_check'};
  }
}
sub _abbreviations {
  my($self) = shift;
  my($value) = shift;
  if (defined $value) {
    $self->{'prefs'}->{'abbreviations'} = $value;
  } else {
    return $self->{'prefs'}->{'abbreviations'};
  }
}
sub _filelistpref {
  my($self) = shift;
  my($value) = shift;
  if (defined $value) {
    $self->{'prefs'}->{'filelistpref'} = $value;
  } else {
    return $self->{'prefs'}->{'filelistpref'};
  }
}
sub _ignorecase {
  my($self) = shift;
  my($value) = shift;
  if (defined $value) {
    $self->{'prefs'}->{'ignorecase'} = $value;
  } else {
    return $self->{'prefs'}->{'ignorecase'};
  }
}
sub _switchglomming {
  my($self) = shift;
  my($value) = shift;
  if (defined $value) {
    $self->{'prefs'}->{'switchglomming'} = $value;
  } else {
    return $self->{'prefs'}->{'switchglomming'};
  }
}
sub _intermingledFiles {
  my($self) = shift;
  my($value) = shift;
  if (defined $value) {
    $self->{'prefs'}->{'intermingledFiles'} = $value;
  } else {
    return $self->{'prefs'}->{'intermingledFiles'};
  }
}

#### Method: argl
############################################################################

Getopt/ExPar.pm  view on Meta::CPAN


  #Parse @ARGV unless an array reference is passed in as second argument
  $argv = \@ARGV unless ((defined $argv) and (ref($argv) eq 'ARRAY'));

  #Do some development checking here
  if ($self->{'prefs'}->{'development_check'}) {
    #Check to make sure that a help_option value exists for all special parameters
    my($str) = [];
    foreach my $par ( keys %{$self->{'parameter'}} ) {
      push(@{$str}, $par) unless (exists $self->{'parameter'}->{$par}->{'help'});
    }

Getopt/ExPar.pm  view on Meta::CPAN

  #Check for first element of $argv for 'switchglomming'.  To meet this criteria,
  # the option must not match a defined parameter or alias, and it must not
  # match an abbreviated option if 'abbreviations' is enabled.
  #This 'if' statement also checks to make sure that the next command line argument
  # starts with a '-', OR that trailing file names are permitted.
  } elsif (($self->{'prefs'}->{'switchglomming'}) and
	   @{$argv} and ($argv->[0] =~ /^-([a-zA-Z0-9]+)$/) and
	   (($self->{'prefs'}->{'ignorecase'} and (not exists $self->{'parameter'}->{lc($1)})) or
	    (not exists $self->{'parameter'}->{$1})) and
	   (($self->{'prefs'}->{'ignorecase'} and (not exists $self->{'aliasnamehash'}->{lc($1)})) or
	    (not exists $self->{'aliasnamehash'}->{$1}))) {
    #Now that we've checked to see if it's a defined parameter or an alias, we need to
    # check to see if it's a match on a parameter abbreviation.
    my(@abb);
    if ($self->{'prefs'}->{'ignorecase'}) {
      @abb = grep { /(?i)^$argv->[0]/ } keys %{$self->{'parameter'}};
    } else {
      @abb = grep { /^$argv->[0]/ } keys %{$self->{'parameter'}};
    }
    #Ok, now check to see if it's a valid 'switchglomming' parameter.
    unless (($self->{'prefs'}->{'abbreviations'}) and @abb) {
      $argv->[0] =~ /^-([a-zA-Z0-9]+)$/;
      my($arg) = ($self->{'prefs'}->{'ignorecase'})? lc($1) : $1;
      #This bit of code makes sure that each letter of the potential switchglom is
      # a defined switch or alias for a swich.  Actually, any user-defined type that has
      # 0 arguments can be enabled through this switchglom mechanism.
      my($sg) = {};
      foreach ( split(//, $arg) ) {

Getopt/ExPar.pm  view on Meta::CPAN

  #Loop through options and parse according to $self
  my($i) = 0;
  while ($i < @{$argv}) {

    #Check for 'ignorecase'
    my($cur_argv) = ($self->{'prefs'}->{'ignorecase'})? lc($argv->[$i]) : $argv->[$i];

    #Parse option
    my($origParameter) = $argv->[$i];
    my($parameter) = $origParameter;
    $parameter =~ s/^-//;
 
    #At this point, determine the correctly capitalized parameter if ignorecase
    if ($self->{'prefs'}->{'ignorecase'}) {
      my($a) = [ grep { lc($parameter) eq lc($_) } keys %{$self->{'parameter'}} ];
      if (@{$a} > 0) {
	$parameter = $a->[0];
      }
    }

Getopt/ExPar.pm  view on Meta::CPAN

    #Make sure this option exists.  First see if it's a defined parameter,
    # then see if it's an alias, then see if it's an abbreviation.
    if (not exists $self->{'parameter'}->{$parameter}) {
      if (exists $self->{'aliasnamehash'}->{$parameter}) {
        $parameter = $self->{'aliasnamehash'}->{$parameter};
      } elsif ($self->{'prefs'}->{'abbreviations'}) {
        my(@args) = grep { ($parameter =~ /^\W/)? /^\\$parameter/ : /^$parameter/ } keys %{$self->{'parameter'}};
        if (@args == 1) {
          if (exists $self->{'parameter'}->{$args[0]}) {
            $parameter = $args[0];
          } else {

Getopt/ExPar.pm  view on Meta::CPAN

      #If $croak is not empty, then no match was found on parameters,
      # so check special parameters.
      if (exists $self->{'special'}) {
        foreach my $sp ( keys %{$self->{'special'}} ) {
          if (($cur_argv =~ /$self->{'special'}->{$sp}->{'special_pattern'}/) or
	      (($cur_argv =~ /(?i)$self->{'special'}->{$sp}->{'special_pattern'}/) and ($self->{'prefs'}->{'ignorecase'}))) {
            $parameter = $sp;
	    last;
          }
        }
      }

      #When at this point, assume argument is a file
      if (not defined $parameter) {
        if ($argv->[$i] !~ /^-/) {
          croak "File list not permitted (starting at '$argv->[$i]')"
            unless (($self->{'prefs'}->{'filelist'} > -1) or ($self->{'prefs'}->{'intermingledFiles'} == 1));
	  if ($self->{'prefs'}->{'intermingledFiles'} == 1) {
	    push(@{$self->{'OPT'}->{'filelist'}}, $argv->[$i]);
	    ++$i;
	    next;
	  } else {
	    push(@{$self->{'OPT'}->{'filelist'}}, @{$argv}[$i..$#{$argv}]);

Getopt/ExPar.pm  view on Meta::CPAN

      &__assign_parameter($self, $p, 'switch');
    }
  #parameter properties passed in as a hash: { 'type' => 'integer', }
  } elsif (ref($_[1]) eq 'HASH') {
    #make sure type is specified in HASH
    if ($self->{'prefs'}->{'development_check'}) {
      croak "'type' must be specified in HASH passed to _parameter method"
	unless ($_[1]->{'type'});
    }
    #do 'type' first, then do other properties ('default', 'alias', etc.)
    &_type($self, $_[0], $_[1]->{'type'});

Getopt/ExPar.pm  view on Meta::CPAN

#######################################################################
# Routine to create hash for specified parameter
#######################################################################
sub __assign_parameter {
  my($self, $parameter, $type) = @_;
  if ($self->{'prefs'}->{'development_check'}) {
    #Check to make sure that parameter is a scalar
    croak "Inappropriate parameter identifier '$parameter'" if ref($parameter);
    #Check to make sure that parameter of that same name doesn't already exit
    croak "Multiply defined parameter '$parameter'"
      if (exists $self->{'parameter'}->{$parameter});

Getopt/ExPar.pm  view on Meta::CPAN

sub _mp { &_multi_parameter(@_); }
sub _multiParameter { &_multi_parameter(@_); }
sub _multi_parameter {
  my($self) = shift;
  my($parameter) = shift;
  if ($self->{'prefs'}->{'development_check'}) {
    carp "Calling multi_parameter w/ only one named subparameter" if (@_ == 1);
  }
  $self->{'parameter'}->{$parameter}->{'required'} = 0;
  $self->{'parameter'}->{$parameter}->{'unique'} = 0;
  $self->{'parameter'}->{$parameter}->{'_ptype'} = 'multi';

Getopt/ExPar.pm  view on Meta::CPAN

      unless (ref($mp) eq 'HASH');
    croak "Call to multi_parameter must have HASH references w/ only one key"
      unless ((scalar keys %{$mp}) == 1);
    my($name) = (keys %{$mp})[0];
    my($type) = $mp->{$name};
    if ($self->{'prefs'}->{'development_check'}) {
      croak "Multiply defined subparameter '$name' in declaration of '$parameter'"
        if (exists $self->{'parameter'}->{$parameter}->{'nameOrder'}->{$name});
      croak "Unknown type '$type' cannot be used by option '$parameter:$name'"
        unless (exists $self->{'types'}->{$type});
    }

Getopt/ExPar.pm  view on Meta::CPAN

sub _multi_special { &_multi_special_parameter(@_); }
sub _multi_special_parameter {
  my($self) = shift;
  my($special) = shift;
  my($special_pattern) = shift;
  if ($self->{'prefs'}->{'development_check'}) {
    carp "Calling multi_special w/ only one named subparameter" if (@_ == 1);
  }
  $self->{'special'}->{$special}->{'required'} = 0;
  foreach my $mp ( @_ ) {
    croak "Call to multi_special must have HASH references as arguments"
      unless (ref($mp) eq 'HASH');
    croak "Call to multi_special must have HASH references w/ only one key"
      unless ((scalar keys %{$mp}) == 1);
    my($name) = (keys %{$mp})[0];
    my($type) = $mp->{$name};
    if ($self->{'prefs'}->{'development_check'}) {
      croak "Multiply defined subparameter '$name' in declaration of '$special'"
        if (exists $self->{'special'}->{$special}->{'nameOrder'}->{$name});
      croak "Unknown type '$type' cannot be used by option '$special:$name'"
        unless (exists $self->{'types'}->{$type});
    }

Getopt/ExPar.pm  view on Meta::CPAN

#######################################################################
# Routine to create hash for specified special parameter
#######################################################################
sub __assign_special_parameter {
  my($self, $special, $pattern, $type) = @_;
  if ($self->{'prefs'}->{'development_check'}) {
    #Check to make sure that parameter of that same name doesn't already exit
    croak "Multiply defined parameter '$special'"
      if ((exists $self->{'special'}->{$special}) or
          (exists $self->{'parameter'}->{$special}));
    #Check to make sure that the specified type exists

Getopt/ExPar.pm  view on Meta::CPAN

#######################################################################
#Routine to associate an alias of set of aliases w/ a parameter
#######################################################################
sub __ooRoutines {
  my($self, $parameter) = @_;
  if ($self->{'prefs'}->{'ooRoutines'}) {
    my($code) = '';
    $code = join('',
		 'sub ', (($parameter =~ /^\d/)? '_' : ''), $parameter,
		 ' { my($self)=shift; return($self->_arg( \'', $parameter, '\', @_)); }', "\n",
		 map { join('',

Getopt/ExPar.pm  view on Meta::CPAN

sub _a { &_alias(@_); }
sub _alias {
  my($self) = shift;
  my($parameter) = shift;
  my(%a) = map { $_, 1 } @_;
  if ($self->{'prefs'}->{'development_check'}) {
    foreach my $a ( @_ ) {
      croak "Alias '$a' specified for '$parameter' is already defined for '$self->{'aliasnamehash'}->{$a}'.\n"
        if (exists $self->{'aliasnamehash'}->{$a});
    }
  }

Getopt/ExPar.pm  view on Meta::CPAN

  my($pKind) = (exists $self->{'special'}->{$parameter})? 'special' : 'parameter';
  if (@{$self->{$pKind}->{$parameter}->{'type'}} > 1) {
    if (@_ > 1) {
      $self->{$pKind}->{$parameter}->{'keys'} = \@_;
    } elsif (ref($_[0]) eq 'HASH') {
      if ($self->{'prefs'}->{'development_check'}) {
	foreach ( keys %{$_[0]} ) {
	  croak "Subparameter $_ does not exist for $parameter"
	    unless (exists $self->{$pKind}->{$parameter}->{'nameOrder'}->{$_});
	}
      }

Getopt/ExPar.pm  view on Meta::CPAN

  croak "Default assignment of type '$self->{$pKind}->{$parameter}->{'type'}->[0]' makes no sense"
    if ($self->{'types'}->{$self->{$pKind}->{$parameter}->{'type'}->[0]}->{'number_of_arguments'} == 0);
  #Store default values
  @{$self->{$pKind}->{$parameter}->{'default'}} = map { [ $_ ] } @_;
  #Bulletproofing....do later (check default values for type matching, etc.
  if ($self->{'prefs'}->{'development_check'}) {
  }
}

#### Method: description
#######################################################################

Getopt/ExPar.pm  view on Meta::CPAN

                      ],
      };

}

#### Method: _parse_prefs
#######################################################################
#Routine to parse prefs hash
#######################################################################
sub __parse_prefs {
  my($self, $prefs) = @_;
  #Overwrite elements in $self as specified by $prefs hash
  foreach my $prefKey (keys %{$prefs}) {
    croak "Unknown preference '$prefKey' specified" unless (exists $self->{'prefs'}->{$prefKey});
    if (ref($self->{'prefs'}->{$prefKey}) eq 'HASH') {
      foreach my $key ( @{$prefs->{$prefKey}} ) {
        $self->{'prefs'}->{$prefKey}->{$key} = 1;
      }
    } else {
      $self->{'prefs'}->{$prefKey} = $prefs->{$prefKey};
    }
  }
}

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

 view all matches for this distribution


Git-Release

 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


GitDDL

 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


Gitosis-Config

 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


Gnome2-GConf

 view release on metacpan or  search on metacpan

examples/basic-gconf-app.pl  view on Meta::CPAN

#!/usr/bin/perl

# This program demonstrates how to use GConf.  The key thing is that
# the main window and the prefs dialog have NO KNOWLEDGE of one
# another as far as configuration values are concerned; they don't
# even have to be in the same process. That is, the GConfClient acts
# as the data "model" for configuration information; the main
# application is a "view" of the model; and the prefs dialog is a
# "controller."
#
# You can tell if your application has done this correctly by
# using "gconftool" instead of your preferences dialog to set
# preferences. For example:
# 
# gconftool --type=string --set /apps/basic-gconf-app/foo "My string"
# 
# If that doesn't work every bit as well as setting the value
# via the prefs dialog, then you aren't doing things right. ;-)
#
#
# If you really want to be mean to your app, make it survive
# this:
# 

examples/basic-gconf-app.pl  view on Meta::CPAN

	$vbox->pack_start($config, TRUE, TRUE, 0);

	$w->signal_connect(destroy => sub { Gtk2->main_quit });
	$w->{client} = $client;

	my $prefs = Gtk2::Button->new("Prefs");
	$vbox->pack_end($prefs, FALSE, FALSE, 0);
	$prefs->signal_connect(clicked => sub {
			my $button = shift;
			my $main_window = shift;

			my $prefs_dialog = $main_window->{prefs};
			if (not $prefs_dialog) {
				my $client = $main_window->{client};
				$prefs_dialog = create_prefs_dialog ($main_window, $client);
				$main_window->{prefs} = $prefs_dialog;
				
				$prefs_dialog->signal_connect(
						destroy => \&prefs_dialog_destroyed,
						$main_window);

				$prefs_dialog->show_all;
			} else {	
				# show existing dialog
				$prefs_dialog->present;
			}
		}, $w);
		
	return $w;
}

examples/basic-gconf-app.pl  view on Meta::CPAN

	
	return $frame;
}

#
# Preferences dialog code. NOTE that the prefs dialog knows NOTHING
# about the existence of the main window; it is purely a way to fool
# with the GConf database. It never does something like change
# the main window directly; it ONLY changes GConf keys via
# GConfClient. This is _important_, because people may configure
# your app without using your preferences dialog.
#
# This is an instant-apply prefs dialog. For a complicated
# apply/revert/cancel dialog as in GNOME 1, see the
# complex-gconf-app.c example. But don't actually copy that example
# in GNOME 2, thanks. ;-) complex-gconf-app.c does show how
# to use GConfChangeSet.
#

sub prefs_dialog_destroyed
{
	my $dialog = shift;
	my $main_window = shift;

	$main_window->{prefs} = undef;
}

sub config_entry_commit
{
	my $entry = shift;

examples/basic-gconf-app.pl  view on Meta::CPAN

	return FALSE;
}

sub create_config_entry
{
	my $prefs_dialog = shift;
	my $client       = shift;
	my $config_key   = shift;
	my $has_focus    = shift || FALSE;

	my $hbox  = Gtk2::HBox->new(FALSE, 6);

examples/basic-gconf-app.pl  view on Meta::CPAN

	
	return $hbox;
}


sub create_prefs_dialog
{
	my $parent = shift;
	my $client = shift;

	my $dialog = Gtk2::Dialog->new("basic-gconf-app Preferences",

 view all matches for this distribution


Growl-NotifySend

 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


GrowthForecast

 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


Gtk2-GladeXML

 view release on metacpan or  search on metacpan

examples/fileman.pl  view on Meta::CPAN

sub on_home_button_clicked {ch_dir($home);}
sub on_back_button_clicked {up_dir();}
sub on_location_go_button_clicked {ch_dir($location->get_text());}
sub on_refresh_button_clicked {refresh_fileview();}
sub on_quit_activate {Gtk2->main_quit;}
sub on_prefs_button_clicked {$preferences->show_all;}
sub on_preferences_activate {$preferences->show_all;}
sub on_about_activate {$about->show_all;}
sub on_main_delete_event {Gtk2->main_quit;}
sub on_prefs_cancelbutton_clicked {$preferences->hide;}
sub on_about_okbutton_clicked {$about->hide;}

#----------------------------------------------------------------------
# Handle dialog 'close' (window-decoration induced close)
#   * Just hide the dialog, and tell Gtk not to do anything else

examples/fileman.pl  view on Meta::CPAN

}

#----------------------------------------------------------------------
# Handle preferencess apply click
#
sub on_prefs_applybutton_clicked {
    my $context = $status->get_context_id('Main');
    $status->push($context, 'Preferences updated');
}
    
#----------------------------------------------------------------------
# Handle prefs ok click (apply/dismiss dialog)
#
sub on_prefs_okbutton_clicked {
    on_prefs_applybutton_clicked();
    $preferences->hide;
}

#----------------------------------------------------------------------
# Handle key presses in location text edit control

 view all matches for this distribution


HTML-Barcode

 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.860 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )