Sponsored Content
Top Forums Shell Programming and Scripting Where do I start to learn PERL? Post 26208 by blt123 on Tuesday 13th of August 2002 03:26:35 PM
Old 08-13-2002
Question Where do I start to learn PERL?

Hello,

What is the best way to start learning PERL? Are there any "learn-it-yourself" websites? Beginner books? etc...

Thanks,
Barbara
 

10 More Discussions You Might Find Interesting

1. Programming

Help me! I just start to learn C in Unix

Hi! I just start to learn C in Unix. I have several questions. 1. What is the different between ¡®gcc¡¯ and ¡®cc¡¯? 2. Assume I type ¡®gcc -o print.out print.c¡¯ and get an error. So I need to retype that sentence. Do I have to repeat the whole thing? Or Is there a shortcut? 3. I completed... (1 Reply)
Discussion started by: yhosun
1 Replies

2. Shell Programming and Scripting

Where can I learn Perl?

Can someone please post a link to site that teaches perl? (2 Replies)
Discussion started by: DISTURBED
2 Replies

3. Shell Programming and Scripting

How to learn Perl

Can anyone suggest homepage related to perl programming? Thank you. (11 Replies)
Discussion started by: lcfoo
11 Replies

4. Shell Programming and Scripting

Looking to learn perl

What do you suggest for someone that doesn't have any programming experience and want to learn perl? (3 Replies)
Discussion started by: bbbngowc
3 Replies

5. What is on Your Mind?

Looking to learn and do not know where to start?

hello all my name is chris. i have no schooling in computers and i am looking to learn as much as i can befor spending any money on something i do not evern know if i would like. i see computers everwhere i go. i work for Garda. i am asking for help in learning all i can about computers and i... (8 Replies)
Discussion started by: petes21in2002
8 Replies

6. Shell Programming and Scripting

Any book to learn perl scripting

Hi, Please suggest me any good book to learn pearl scripting. Thanks in advance !!!!:) (5 Replies)
Discussion started by: vkvishwakarma6
5 Replies

7. UNIX for Dummies Questions & Answers

To learn PERL

Hi, Would like to learn PERL, can anyone let me know what are the useful sources... any links... good books for the beginners to start and practice? Many thanks. (3 Replies)
Discussion started by: venkatesht
3 Replies

8. Shell Programming and Scripting

My PM has told me to learn shell scripting in 2 weeks , how should I start?

My PM has told me to learn shell scrting in 2 weeks , how should I start?:confused::confused::confused::confused: (1 Reply)
Discussion started by: manalisharmabe
1 Replies

9. Shell Programming and Scripting

How much bash to learn compared with Perl?

Hello Everyone! I am somewhat new to Unix command line and don't have much experience to input on the matter so I wanted to gather some opinion's from people who have been down the road already. Currently, I am going through a book by John Muster called "Unix Made Easy". I have gone... (2 Replies)
Discussion started by: budfoxcat
2 Replies

10. What is on Your Mind?

Book to learn Perl

Hi guys, which book are you raccomand to start learn Perl from the ground ? (1 Reply)
Discussion started by: solaris_user
1 Replies
DBIx::Class::Helper::ResultSet::CorrelateRelationship(3pUser Contributed Perl DocumentatDBIx::Class::Helper::ResultSet::CorrelateRelationship(3pm)

NAME
DBIx::Class::Helper::ResultSet::CorrelateRelationship - Easily correlate your ResultSets VERSION
version 2.013002 SYNOPSIS
package MyApp::Schema::ResultSet::Author; use base 'DBIx::Class::ResultSet'; __PACKAGE__->load_components(qw(Helper::ResultSet::CorrelateRelationship)); sub with_book_count { my $self = shift; $self->search(undef, { '+columns' => { book_count => $self->correlate('book')->count_rs->as_query } }); } 1; And then elsewhere, like in a controller: my $rows = $schema->resultset('Author')->with_book_count->all; DESCRIPTION
Correlated queries are one of the coolest things I've learned about for SQL since my initial learning of SQL. Unfortunately they are somewhat confusing. DBIx::Class has supported doing them for a long time, but generally people don't think of them because they are so rare. I won't go through all the details of how they work and cool things you can do with them, but here are a couple high level things you can use them for to save you time or effort. If you want to select a list of authors and counts of books for each author, you could use "group_by" and something like "COUNT(book.id)", but then you'd need to make your select list match your "group_by" and it would just be a hassle forever after that. The "SYNOPSIS" is a perfect example of how to implement this. If you want to select a list of authors and two separate kinds of counts of books for each author, as far as I know, you must use a correlated subquery in DBIx::Class. Here is an example of how you might do that: package MyApp::Schema::ResultSet::Author; use base 'DBIx::Class::ResultSet'; __PACKAGE__->load_components(qw(Helper::ResultSet::CorrelateRelationship)); sub with_good_book_count { my $self = shift; $self->search(undef, { '+columns' => { good_book_count => $self->correlate('books')->good->count_rs->as_query } }); } sub with_bad_book_count { my $self = shift; $self->search(undef, { '+columns' => { bad_book_count => $self->correlate('books')->bad->count_rs->as_query } }); } 1; And then elsewhere, like in a controller: my $rows = $schema->resultset('Author') ->with_bad_book_count ->with_good_book_count ->all; This assumes that the Book resultset has "good" and "bad" methods. See "NOTE" in DBIx::Class::Helper::ResultSet for a nice way to apply it to your entire schema. METHODS
correlate $rs->correlate($relationship_name) Correlate takes a single argument, a relationship for the invocant, and returns a resultset that can be used in the selector list. AUTHOR
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com> COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Arthur Axel "fREW" Schmidt. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2012-06-18 DBIx::Class::Helper::ResultSet::CorrelateRelationship(3pm)
All times are GMT -4. The time now is 09:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy