view release on metacpan or search on metacpan
bin/gpsketcher view on Meta::CPAN
use constant FALSE => !TRUE;
sub new {
my ( $class, $glade_file ) = @_;
die "Invalid glade file filename" unless $glade_file =~ /\.glade$/;
my $self = bless { } => $class;
$self->{creation_function} = FALSE; # is it creation_function?
$self->{requires_gnome} = FALSE; # is it a Gnome App?
$self->{data} = {}; # data tree for CodeGen
$self->{stack} = []; # widgets stack
$self->{main_widget} = FALSE; # is main_widget set?
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/HTML5/Parser/TagSoupParser.pm view on Meta::CPAN
package HTML::HTML5::Parser::TagSoupParser::RestartParser;
sub new
{
my ($class, %opts) = @_;
bless \%opts => $class;
}
sub throw
{
my ($class, %opts) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/HTML5/Writer.pm view on Meta::CPAN
option p rp rt td th tfoot thead tr);
sub new
{
my ($class, %opts) = @_;
my $self = bless \%opts => $class;
$self->{'markup'} //= 'html';
$self->{'charset'} //= 'utf8';
$self->{'refs'} //= 'hex';
$self->{'doctype'} //= ($self->is_xhtml? DOCTYPE_LEGACY : DOCTYPE_HTML5);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/MasonX/ApacheLikePlackHandler.pm view on Meta::CPAN
# XXX: This is very naive, in reality an APR::Table maybe
# can't be represented as a hash (multiple values for the same
# key?). Or at least we need magic to implement a similar
# Tie-interface.
bless $table => $class;
}
sub get {
my ($self, $key) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Command/Wrapper/Curl.pm view on Meta::CPAN
use warnings;
use utf8;
sub new {
my ($class, $opt) = @_;
return bless { opt => $opt } => $class;
}
sub fetch_able {
my ($self, $url, $headers) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Headers/ActionPack/ContentNegotiation.pm view on Meta::CPAN
my $action_pack = shift;
(blessed $action_pack && $action_pack->isa('HTTP::Headers::ActionPack'))
|| confess "You must supply an instance of HTTP::Headers::ActionPack";
bless { action_pack => $action_pack } => $class;
}
sub action_pack { (shift)->{'action_pack'} }
sub choose_media_type {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Promise/Headers.pm view on Meta::CPAN
{
warn( "No error object provided and no previous error set either! It seems the previous method call returned a simple undef\n" );
}
else
{
$err = ( defined( $class ) ? bless( $self->{error} => $class ) : $self->{error} );
}
}
elsif( defined( $err ) &&
Scalar::Util::blessed( $err ) &&
( scalar( @_ ) == 1 ||
( scalar( @_ ) == 2 && defined( $class ) )
) )
{
$self->{error} = ${ $pack . '::ERROR' } = ( defined( $class ) ? bless( $err => $class ) : $err );
}
# If the error provided is not an object, we call error to create one
else
{
return( $self->error( @_ ) );
view all matches for this distribution
view release on metacpan or search on metacpan
t/http_tiny/BrokenCookieJar.pm view on Meta::CPAN
use strict;
use warnings;
sub new {
my $class = shift;
return bless {} => $class;
}
package t::http_tiny::BrokenCookieJar2;
use strict;
use warnings;
sub new {
my $class = shift;
return bless {} => $class;
}
sub add {
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/BrokenCookieJar.pm view on Meta::CPAN
use strict;
use warnings;
sub new {
my $class = shift;
return bless {} => $class;
}
package BrokenCookieJar2;
use strict;
use warnings;
sub new {
my $class = shift;
return bless {} => $class;
}
sub add {
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Upload/FlowJs.pm view on Meta::CPAN
$options{ simultaneousUploads } ||= 3;
$options{ mime } ||= MIME::Detect->new();
$options{ fileParameterName } ||= 'file';
$options{ allowedContentType } ||= sub { 1 };
bless \%options => $class;
};
=head2 C<< $flowjs->incomingDirectory >>
Return the incoming directory name.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTPD/Authen.pm view on Meta::CPAN
sub new {
require MIME::Base64;
my($class,$ref) = @_;
$ref ||= {};
bless $ref => $class;
}
sub parse {
my($self,$string) = @_;
$string =~ s/^Basic\s+//;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Hash/Persistent.pm view on Meta::CPAN
} else {
$_self->{format} = 'json' if $_self->{format} eq 'auto'; # default format for new files
$self = {};
}
bless $self => $class;
$meta->{$self} = $_self;
return $self;
}
sub commit {
view all matches for this distribution
view release on metacpan or search on metacpan
t/as_return.t view on Meta::CPAN
or note $@;
is(
$obj,
meta {
prop blessed => $class;
prop this => object {
call answer => 42;
};
},
"object works!"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IO/Uncompress/AnyInflate.pm view on Meta::CPAN
my @names = @_ ;
my $keep = ref $self ;
for my $class ( map { "IO::Uncompress::$_" } @names)
{
bless $self => $class;
my $magic = $self->ckMagic();
if ($magic)
{
#bless $self => $class;
return $magic ;
}
$self->pushBack(*$self->{HeaderPending}) ;
*$self->{HeaderPending} = '' ;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IO/File/WithPath.pm view on Meta::CPAN
my $io = IO::File->new($path, @_);
# symboltable hack
${*$io}{+__PACKAGE__} = $path;
bless $io => $class;
}
sub path {
my $io = shift;
${*$io}{+__PACKAGE__};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IO/Handle/Rewind.pm view on Meta::CPAN
sub new {
my ($class, $obj, $opt) = @_;
$obj->isa('IO::Handle') or croak "Can't wrap non-IO::Handle object: $obj";
my $self = bless {} => $class;
$self->obj($obj);
return $self;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IO/TieCombine.pm view on Meta::CPAN
my $self = {
combined => \(my $str = ''),
slots => { },
};
bless $self => $class;
}
#pod =method combined_contents
#pod
#pod This method returns the contents of all collected data.
view all matches for this distribution
view release on metacpan or search on metacpan
croak "Cannot open a pty" if not defined $ptyfd;
my $pty = $class->SUPER::new_from_fd( $ptyfd, "r+" );
croak "Cannot create a new $class from fd $ptyfd: $!" if not $pty;
$pty->autoflush(1);
bless $pty => $class;
my $slave = IO::Tty->new_from_fd( $ttyfd, "r+" );
croak "Cannot create a new IO::Tty from fd $ttyfd: $!" if not $slave;
$slave->autoflush(1);
view all matches for this distribution
view release on metacpan or search on metacpan
t/010_IOC_test.t view on Meta::CPAN
{
package FileLogger;
sub new {
my ($class, $log_file) = @_;
($log_file eq 'logfile.log') || die "Got wrong log file";
bless { log_file => $log_file } => $class;
}
package Application;
sub new {
my $class = shift;
bless { logger => undef } => $class
}
sub logger {
my ($self, $logger) = @_;
(UNIVERSAL::isa($logger, 'FileLogger')) || die "Got wrong logger type";
$self->{logger} = $logger;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/IPC/Shareable/SharedMem.pm view on Meta::CPAN
_size => $size,
_flags => $flags,
_type => $type,
};
return bless $sh => $class;
}
sub id {
my $self = shift;
$self->{_id} = shift if @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Image/JpegMinimal.pm view on Meta::CPAN
$options{ jpegquality } ||= 20;
$options{ xmax } ||= 42;
$options{ ymax } ||= 42;
bless \%options => $class
}
sub get_imager {
my( $self, $file ) = @_;
# We should check that Imager can write jpeg images
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JIRA/Client.pm view on Meta::CPAN
$RemoteCustomFieldValue::VERSION = '0.45';
sub new {
my ($class, $id, $values) = @_;
$values = [$values] unless ref $values;
return bless({customfieldId => $id, key => undef, values => $values} => $class);
}
package RemoteComponent;
$RemoteComponent::VERSION = '0.45';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JIRA/REST/Class/Mixins.pm view on Meta::CPAN
return "DateTime( $thing )";
}
if ( $top ) {
if ( reftype $thing eq 'ARRAY' ) {
chomp( my $data = Dumper( __array_copy( $thing ) ) );
return "bless( $data => $class )";
}
if ( reftype $thing eq 'HASH' ) {
chomp( my $data = Dumper( __hash_copy( $thing ) ) );
return "bless( $data => $class )";
}
return Dumper( $thing );
}
else {
my $fallback;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JSON/Hyper.pm view on Meta::CPAN
sub new
{
my ($class, $schema) = @_;
$schema ||= json_ref();
$schema = from_json($schema) unless ref $schema;
return bless { schema => $schema, ua => undef } => $class;
}
sub schema
{
my ($self) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JSON/Pointer/Context.pm view on Meta::CPAN
result => 0,
target => undef,
parent => undef,
%$args,
);
bless $args => $class;
}
sub begin {
my ($self, $token) = @_;
$self->{last_token} = $token;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/JSV/Reference.pm view on Meta::CPAN
registered_schema_map => {},
max_recursion => 10,
%$args,
);
bless $args => $class;
}
sub resolve {
my ($self, $ref, $opts) = @_;
die 'ref value should be hash' unless ref $ref eq 'HASH';
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Jabber/NodeFactory.pm view on Meta::CPAN
kids => [],
parent => $parent,
};
weaken($node->{parent}); # XXX
bless $node => $class;
$node->attr('xmlns' => $xmlns) if $xmlns;
return $node;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Jabber/RPC/HTTPgate.pm view on Meta::CPAN
$self->{nf} = new Jabber::NodeFactory;
$self->{c}->connect or die "Oops: ".$self->{c}->lastError;
$self->{c}->auth($self->{pass});
bless $self => $class;
return $self;
}
sub start {
view all matches for this distribution